Skip to content

Fix invalid YAML front matter for terms with no tags#408

Merged
Robbie1977 merged 1 commit into
masterfrom
fix/empty-tags-yaml
Jun 22, 2026
Merged

Fix invalid YAML front matter for terms with no tags#408
Robbie1977 merged 1 commit into
masterfrom
fix/empty-tags-yaml

Conversation

@Robbie1977

Copy link
Copy Markdown

A term with an empty Tags list still had its ID-prefix tag appended onto an empty CSV string in vfbterms.py, producing tags: [,VFB]. The leading comma is an empty flow-sequence node, which go-yaml rejects ("did not find expected node content"), failing the Hugo build on VFB_00017893_v8.md.

Fix: build the tag list properly and drop empty entries before joining, so a leading/trailing comma can't be emitted for any input.

Note for deploy: existing *_v8.md already present in the build workspace are not regenerated by save_terms (it skips files that exist until the version bumps), so they must be swept separately:

grep -rlZ '^tags: \[,' --include='*_v8.md' content/en/blog/ontologies/ | xargs -0 sed -i 's/^tags: \[,/tags: [/'

A term with an empty Tags list still had its ID-prefix tag appended onto
an empty CSV string, producing "tags: [,VFB]". The leading comma is an
empty flow-sequence node, which go-yaml rejects ("did not find expected
node content"), failing the Hugo build on VFB_00017893_v8.md.

Build the tag list properly and drop empty entries before joining.
@Robbie1977 Robbie1977 merged commit 1e540e1 into master Jun 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant