aaranxu / adidoks

AdiDoks is a mordern documentation theme, which is a port of the Hugo theme Doks for Zola.
https://adidoks.org
MIT License
220 stars 80 forks source link

Fix JSON-LD breadcrumbs #61

Open skittles1412 opened 1 year ago

skittles1412 commented 1 year ago

Previously JSON-LD was broken, both because the list of breadcrumbs was not wrapped in an array and because the array had a trailing comma.

I've added a dummy element [] to the end of the array to deal with the trailing comma issue. This feels a bit hacky, but I'm not sure if there's a better solution.

tqwewe commented 1 year ago

Nice, thanks for this!

I also changed in the same file:

- "image": {{ page_images }},
+ "image": {% if page_images %}{{ page_images }}{% else %}""{% endif %},