-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Summary
Allow template expressions ({{ }}) and shortcodes within markdown files, with recursive markdown processing of the output.
Motivation
Currently, templating only happens at the template level. But often you want to inject dynamic content directly into your markdown - a variable, a computed value, or a complex shortcode that wraps content.
Proposed Design
Simple interpolation
Support {{ var }} directly in markdown files:
# My Project
This codebase has {{ build.rust_loc }} lines of Rust.Shortcode system (ported from cove)
Support the blockquote-emphasis shortcode syntax from cove:
> *:tip(title="Pro tip")*
>
> This content is inside the shortcode and gets processed as markdown.Shortcodes are defined as templates in /templates/shortcodes/{name}.html.jinja.
Processing model
Recursive markdown processing: The output of {{ }} interpolation and shortcodes is processed as markdown. This allows:
- Shortcodes to emit markdown that gets rendered
- Dynamic content to include markdown formatting
Code block handling
Must be careful not to process {{ }} inside fenced code blocks or inline code. These should be left as-is.
Open questions
- Exact timing in the markdown pipeline
- How to handle errors in template expressions gracefully
- Escaping mechanism if you want literal
{{ }}in content (outside code blocks)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels