Conversation
This simplifies keeping the site up to date with the latest releases. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Hugo v0.155.3 upgraded its go-yaml dependency to v3, which internally
counts structurally identical non-scalar YAML nodes (maps, sequences) as
"aliases" even when the file contains no explicit YAML anchors or alias
references. The default limit is 10,000 such nodes, and docs.yml exceeds
that threshold because many of its ~310 manual pages share identical
single-key maps like `{name: "2.53.0"}` in their version lists.
Switching the serialization format from YAML to JSON sidesteps the
go-yaml parser entirely. Hugo supports JSON data files natively via
the file extension, so templates continue to access the data through
`.Site.Data.docs` without any changes.
The `→` HTML entity in version range labels is replaced with the
literal Unicode arrow `→` since JSON does not need HTML entity encoding
and the character renders identically in browsers.
A `convert_timestamps` helper is added to `read_data` because JSON has
no native timestamp type: `committed` values are serialized as strings
by `JSON.dump` and must be parsed back to Ruby `Time` objects for the
`>=` comparisons and `.strftime` calls in the indexing logic. The now
unnecessary `yaml_dump_quoted` helper (which was an earlier, incorrect
attempt to work around this problem by quoting `&`-containing values)
is removed.
The existing `docs.yml` was converted to `docs.json` via:
ruby -ryaml -rjson -e \
"data = YAML.load_file('external/docs/data/docs.yml'); \
File.write('external/docs/data/docs.json', JSON.dump(data))"
Assisted-by: Claude Opus 4.6
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
There have been a couple of changes recently that _might_ require updates to how we build the site. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
data/docs.ymlby converting it to JSONContext
It's always good to stay up to date with dependencies. Our principal dependency, Hugo, occasionally introduces breaking changes and it is good to stay on top of those changes by adapting your site accordingly.