fix: comma inclusion in breadcrumb schema #1644
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR change? What problem does it solve?
This PR fixes a JSON syntax error in the schema_json.html template that causes Hugo builds to fail. The error occurs in the breadcrumb list generation where commas between JSON objects are not properly handled when adding the self-page item to the breadcrumb list.
The current template attempts to add a comma before the self-page item using this condition:
This causes build failures with error messages like:
The fix simplifies the comma handling logic to:
This ensures proper JSON syntax by adding a comma whenever there are existing breadcrumb items before the self-page addition.
Was the change discussed in an issue or in the Discussions before?
No prior discussion. The issue was discovered when building a site with the theme and verified through testing.
PR Checklist