How to use it
- Enter the site address, for example
https://example.com. - Write the trail, one page per line: the name as shown on the page, a
|(or a tab) and the address. - Leave the address off the last line if it is the current page.
- Copy the script and paste it into the page.
How it works
Each line becomes a ListItem with position counted from 1, name and item (the URL). A path starting with / is added to the site address without a doubled slash; full http:// or https:// addresses are used as typed. The list is wrapped in a BreadcrumbList with "@context": "https://schema.org" and put into a <script type="application/ld+json"> tag. The < character is written as <, so a name cannot close the script tag.
Example
With the site address https://example.com and the lines
Home | /
Books | /books/
Science fiction | /books/sci-fi/
The Left Hand of Darkness
the result has 4 items. The first is {"@type": "ListItem", "position": 1, "name": "Home", "item": "https://example.com/"}, the third points to https://example.com/books/sci-fi/, and the fourth has only a position and a name.
Tips
- Use the same names as the visible breadcrumbs, not page titles with the site name.
- Use the canonical URLs of the pages, with the same protocol and trailing slash as your links.
- One trail per page path is enough; the list does not need to include every parent category.