Repository navigation
Add CI check for post front matter - #72
Merged
Merged
Conversation
Jekyll reports front-matter problems against the template that fails (usually index.html), not the post that caused them. The new check validates each post in _posts/ and reports the file and line at fault, as GitHub annotations in CI. Also fix the two posts that were breaking the build: ds003499 had no `extras` key and ds007908 had an empty one, which makes Liquid's `concat` fail in index.html. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
When the site won't build, Jekyll names the template that failed (usually
index.html), not the post that caused the problem. The newcheck postsworkflow runs.github/scripts/check_posts.pyon every post in_posts/. It reports the exact file and line, and the problems show up as annotations on the PR diff.Errors (these fail the check, because they break the build or are certainly mistakes):
---front matter, invalid YAML, duplicate keyslayout/categoriesnot set todataset; an emptytitlewebsite/fmriprep/afnithat aren't http(s) URLsechoes/extrasthat aren't lists, or that hold the wrong types. A missing or empty value makesconcatfail inindex.html.Warnings (these only affect how a dataset displays): unknown keys, unknown extras, an empty
echoes, fewer than 3 echoes, and ascannerthat is unset or isn't 3T/7T.This PR also fixes the two posts that have been breaking the deploy on main:
ds003499had noextraskey andds007908had an empty one. The check now passes with one warning: the Zenodo post has noscanner.🤖 Generated with Claude Code