Skip to content

Fix Jekyll build failure caused by Jinja2 syntax in scripts/docs/#2592

Merged
kgeller merged 1 commit intoelastic:mainfrom
kgeller:build-fix
Mar 24, 2026
Merged

Fix Jekyll build failure caused by Jinja2 syntax in scripts/docs/#2592
kgeller merged 1 commit intoelastic:mainfrom
kgeller:build-fix

Conversation

@kgeller
Copy link
Copy Markdown
Contributor

@kgeller kgeller commented Mar 23, 2026

Summary

The GitHub Pages build on main has been failing since #2569 landed, which added scripts/docs/markdown-generator.md. That file contains Jinja2 template syntax (e.g. {% macro %}) inside fenced code blocks. Jekyll's Liquid engine processes {% %} delimiters even inside code blocks, and macro is not a valid Liquid tag, causing the build to crash with: Liquid syntax error (line 189): Unknown tag 'macro'

Fix

Add a _config.yml at the repo root that excludes scripts/ (and other internal directories like venv/, generated/, experimental/) from Jekyll processing. These directories contain internal developer tooling that was never intended to be published as part of the GitHub Pages site.

Test plan

Confirm the GitHub Pages build job passes on main after merge

Note: The pages-build-deployment workflow is GitHub's auto-generated Pages workflow and only runs on pushes to main — it has no PR trigger. This fix cannot be validated by CI before merge.

Sample broken build: https://github.com/elastic/ecs/actions/runs/23446341689/job/68211045270

Add _config.yml to exclude scripts/ and other internal directories
from Jekyll processing. The file scripts/docs/markdown-generator.md
introduced in elastic#2569 contains Jinja2 {% macro %} tags which are unknown
to Liquid, crashing the GitHub Pages build.
@kgeller kgeller self-assigned this Mar 23, 2026
@kgeller kgeller requested a review from a team as a code owner March 23, 2026 20:30
@github-actions
Copy link
Copy Markdown

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@kgeller kgeller merged commit 6e0fa49 into elastic:main Mar 24, 2026
9 checks passed
@kgeller kgeller deleted the build-fix branch March 24, 2026 16:50
@kgeller
Copy link
Copy Markdown
Contributor Author

kgeller commented Mar 24, 2026

Verified build is successful on main now ✅

Screenshot 2026-03-24 at 12 50 27 PM

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.

2 participants