Skip to content

Add CI check for post front matter - #72

Merged
tsalo merged 1 commit into
mainfrom
check-post-front-matter
Oct 19, 2026
Merged

tsalo merged 1 commit into
mainfrom
check-post-front-matter

Conversation

@tsalo

@tsalo tsalo commented Oct 19, 2026

Copy link
Copy Markdown
Member

When the site won't build, Jekyll names the template that failed (usually index.html), not the post that caused the problem. The new check posts workflow runs .github/scripts/check_posts.py on 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):

  • missing or unclosed --- front matter, invalid YAML, duplicate keys
  • missing required keys; layout/categories not set to dataset; an empty title
  • website/fmriprep/afni that aren't http(s) URLs
  • echoes/extras that aren't lists, or that hold the wrong types. A missing or empty value makes concat fail in index.html.
  • an invalid date in the file name

Warnings (these only affect how a dataset displays): unknown keys, unknown extras, an empty echoes, fewer than 3 echoes, and a scanner that is unset or isn't 3T/7T.

This PR also fixes the two posts that have been breaking the deploy on main: ds003499 had no extras key and ds007908 had an empty one. The check now passes with one warning: the Zenodo post has no scanner.

🤖 Generated with Claude Code

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>
@tsalo
tsalo merged commit d45eed5 into main Oct 19, 2026
3 checks passed
@tsalo
tsalo deleted the check-post-front-matter branch October 20, 2026 12:00
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