Breadcrumb Navigation Path JSON-LD

Hi team,

I am trying to add a SEO friendly breadcrumb navigation to one of my dynamic collection pages. I want it to automatically update based on which category was loaded. Is there a way to do this in weweb?

I cant seem to find a bind function in the custom code section for dynamic pages. Am I missing something? The JSON-LD should look something like this

<script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "BreadcrumbList",
      "itemListElement": [{
        "@type": "ListItem",
        "position": 1,
        "name": "Books",
        "item": "https://example.com/books"
      },{
        "@type": "ListItem",
        "position": 2,
        "name": "Science Fiction",
        "item": "https://example.com/books/sciencefiction"
      },{
        "@type": "ListItem",
        "position": 3,
        "name": "Award Winners"
      }]
    }
    </script>

But each listItem should be dynamic.

Thanks, Seb

If this is not required to be injected at a specific place within the DOM (e.g. in the <head> of the document) I’d suggest you just use a HTML block as the first/last element in your WeWeb page and do your thing there.

Thanks! I guess thats my fallback right now. Googles doc puts it in the header section but not 100% sure if thats necessary.

Will do more research, thanks!