diff --git a/CHANGELOG.md b/CHANGELOG.md index 65ff53c..988450f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## Unreleased +### Bug Fixes + +- fix: Register the filter at `pre-quarto` in the extension manifest, so listing `lua-env` under `filters` is enough. The shortcode reads metadata the filter publishes, and a filter left at the default entry point published it after Quarto had expanded the shortcodes, so every `{{< lua-env >}}` rendered as nothing unless the entry point was named by hand. +- fix: Raise `quarto-required` to `>=1.9.38`, the first version whose `_extension.yml` schema accepts a filter entry point. + ## 1.5.1 (2026-08-01) ### Documentation diff --git a/_extensions/lua-env/_extension.yml b/_extensions/lua-env/_extension.yml index a00706f..f5a40ee 100644 --- a/_extensions/lua-env/_extension.yml +++ b/_extensions/lua-env/_extension.yml @@ -1,9 +1,10 @@ title: Lua Environment author: Mickaƫl Canouil version: 1.5.1 -quarto-required: ">=1.4.459" +quarto-required: ">=1.9.38" contributes: shortcodes: - lua-env-shortcode.lua filters: - - lua-env-filter.lua + - path: lua-env-filter.lua + at: pre-quarto diff --git a/docs/examples.qmd b/docs/examples.qmd index db9cf80..80941c2 100644 --- a/docs/examples.qmd +++ b/docs/examples.qmd @@ -9,8 +9,7 @@ The filter is enabled in this site's `_quarto.yml`: ```yaml filters: - - path: lua-env - at: pre-quarto + - lua-env ``` ## Pandoc diff --git a/docs/index.qmd b/docs/index.qmd index be20a38..423a17b 100644 --- a/docs/index.qmd +++ b/docs/index.qmd @@ -39,8 +39,7 @@ The filter has to be enabled before the shortcode has anything to read: ```yaml filters: - - path: lua-env - at: pre-quarto + - lua-env ``` Then name a value by its dot-separated path: diff --git a/docs/reference.qmd b/docs/reference.qmd index 487544d..00ff4cd 100644 --- a/docs/reference.qmd +++ b/docs/reference.qmd @@ -10,24 +10,11 @@ The shortcode reads metadata the filter collects, so the filter has to run first ```yaml filters: - - path: lua-env - at: pre-quarto -``` - -::: {.callout-caution} -`at: pre-quarto`, not `at: post-quarto`. -Quarto expands shortcodes during its own pass, so a filter placed after that pass publishes the metadata too late. -Every `{{{< lua-env >}}}` then warns that no `lua-env` metadata was found and renders nothing, while the document itself builds as though nothing were wrong. -::: - -Ordering the filter by hand has the same effect, and is what a project already listing `quarto` among its filters will be doing: - -```yaml -filters: - - quarto - lua-env ``` +The extension registers the filter at `pre-quarto`, before Quarto expands shortcodes, so the entry point never has to be named here. + ## Shortcode ```markdown diff --git a/example.qmd b/example.qmd index a92b63c..828fbe5 100644 --- a/example.qmd +++ b/example.qmd @@ -9,10 +9,7 @@ format: html: toc: true filters: - # pre-quarto, not post-quarto: Quarto expands shortcodes during its own pass, - # so a filter placed after it publishes the metadata too late. - - path: lua-env - at: pre-quarto + - lua-env extensions: lua-env: json: false