Closed danielfdickinson closed 1 year ago
Can you also keep an eye on the generated HTML. I know it does not matter from a technical point but I like when it looks nice.
I prefer nice-looking HTML too, so I will work on that as well.
Can you also keep an eye on the generated HTML. I know it does not matter from a technical point but I like when it looks nice.
Okay, I started with this. I ended having a lot more difficulty convincing it to format properly than I expected. Using safeJS
as a function instead via a pipe (|
) seems to be necessary, for some reason.
Please let me know if you want more documentation (or any other changes, of course).
@danielfdickinson Thanks for this nice contribution!
I made some minor code style changes and moved the call to safeJS
into the "meta_breadcrumb_json_ld.html" file.
Can you test so I didn't mess it up?
Get no warnings or errors when checking on https://validator.schema.org/, nice!
I'll double-check shortly, but don't expect any issues. Thank you!
Can you test so I didn't mess it up?
It's working on my test site https://dfd-hugo-theme-zen.demo.wildtechgarden.com and the blog I've updated https://www.danielfdickinson.ca.
Looks good to me.
This implementation depends on .Page.Ancestors, which requires Hugo version v0.109.0.
I expect changes to be requested, hence the 'Draft' PR type.
If v0.109.0 is too high to require, I'll work on a non-
.Ancestors
option for older versions of Hugo.