-
-
Notifications
You must be signed in to change notification settings - Fork 0
Zensical strips YAML front matter before Markdown extensions (front matter variables not available) #9
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
When building this project’s docs with Zensical, YAML front matter is stripped from Markdown files before Python-Markdown extensions run. As a result, markdown_macros cannot see page front matter and cannot expose front-matter keys as Jinja2 template variables during a Zensical build.
This breaks the expectation/compatibility story for front-matter-as-variables in Zensical and means the live demo cannot actually validate front matter rendering (it can only validate config/module/include_yaml variables).
Evidence
- Zensical docs: front matter is “stripped from the file contents before the rest of the content is handed over to the Markdown parser”.
- In the built docs output (
site/demo/index.html), the demo’s rendered section showsfm_author/fm_featuresempty even though the source code block contains them.
Expected
Either:
- Zensical provides a way to disable front matter stripping, or
- Zensical provides a mechanism to pass parsed
page.meta(front matter) into Python-Markdown extensions (e.g. as per-page extension variables), or - The docs/demo and project docs clearly document this as a Zensical limitation and suggest alternatives.
Proposed next steps
- Update
docs/demo.mdto explicitly call out the limitation and demonstrate front matter rendering via a plain-Python example (where the extension does receive front matter). - Optionally open an upstream issue/feat
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working