adityatelange / hugo-PaperMod

A fast, clean, responsive Hugo theme.
https://adityatelange.github.io/hugo-PaperMod/
MIT License
9.53k stars 2.58k forks source link

Improve breadcrumb schema generation #1471

Open zeeZ opened 5 months ago

zeeZ commented 5 months ago

What does this PR change? What problem does it solve?

When run with HUGO_UGLYURLS=true, the position count is wrong and a comma is missing between array elements, causing errors during minification. This PR decouples position counting from (potentially skipped) bc_list array indices and length, making it slightly more robust.

Was the change discussed in an issue or in the Discussions before?

Also fixes #1441 and its reproducer, which shows the same behavior

PR Checklist

sonarcloud[bot] commented 5 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud