README.md in gretel-4.1.0 vs README.md in gretel-4.2.0

- old
+ new

@@ -217,9 +217,26 @@ <% end %> <% end %> <% end %> ``` +If you use this approach, you lose the built-in semantic breadcrumb functionality. One way to +add them back is to use JSON-LD structured data: + +```erb +<script type="application/ld+json"> + <%= breadcrumbs.structured_data(url_base: "https://example.com")) %> +</script> +``` + +Or, you can infer `url_base` from `request`: + +```erb +<script type="application/ld+json"> + <%= breadcrumbs.structured_data(url_base: "#{request.protocol}#{request.host_with_port}")) %> +</script> +``` + ## Getting the parent breadcrumb If you want to add a link to the parent breadcrumb, you can use the `parent_breadcrumb` view helper. By default it returns a link instance that has the properties `#key`, `#text`, and `#url`. You can supply options like `autoroot: false` etc.