From d42d681484f7d481cad07a1c412c3251c1dafbc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Canouil?= <8896044+mcanouil@users.noreply.github.com> Date: Sat, 1 Aug 2026 20:37:41 +0200 Subject: [PATCH] fix: declare the filter entry point in the extension manifest Listing `gitlink` under `filters` is now enough. Quarto reads `at:` from `contributes.filters`, so `post-quarto` no longer has to be repeated in project or document YAML, and the documentation drops the long form. Raise `quarto-required` to >=1.9.38, the first version whose `_extension.yml` schema accepts a filter entry point. Below it the render fails validation. --- CHANGELOG.md | 5 +++++ _extensions/gitlink/_extension.yml | 5 +++-- docs/index.qmd | 7 ++----- docs/reference.qmd | 8 ++------ example.qmd | 6 ++---- 5 files changed, 14 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc45c8d..4418eaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## Unreleased +### Bug Fixes + +- fix: Register the filter at `post-quarto` in the extension manifest, so listing `gitlink` under `filters` is enough and the entry point no longer has to be named in project or document YAML. The long form `path`/`at` overrides the entry point of every filter an extension contributes, so it is best avoided. +- fix: Raise `quarto-required` to `>=1.9.38`, the first version whose `_extension.yml` schema accepts a filter entry point. + ## 1.9.2 (2026-08-01) ### Documentation diff --git a/_extensions/gitlink/_extension.yml b/_extensions/gitlink/_extension.yml index 2b6a0a3..2cc652a 100644 --- a/_extensions/gitlink/_extension.yml +++ b/_extensions/gitlink/_extension.yml @@ -1,7 +1,8 @@ title: gitlink author: Mickaƫl Canouil version: 1.9.2 -quarto-required: ">=1.8.21" +quarto-required: ">=1.9.38" contributes: filters: - - gitlink.lua + - path: gitlink.lua + at: post-quarto diff --git a/docs/index.qmd b/docs/index.qmd index e458eee..4264e16 100644 --- a/docs/index.qmd +++ b/docs/index.qmd @@ -37,8 +37,7 @@ Or install it from your editor with [Quarto Wizard](https://m.canouil.dev/quarto ```yaml filters: - - path: gitlink - at: post-quarto + - gitlink extensions: gitlink: platform: github @@ -53,9 +52,7 @@ Fixed in #1, see also mcanouil/quarto-gitlink#1. The repository is detected from the git remote when it is not given. -::: {.callout-important} -`post-quarto` is required, so Quarto resolves its own cross-references before this filter looks at the text. -::: +The extension registers the filter at `post-quarto`, so Quarto resolves its own cross-references before it looks at the text. See the [Reference](reference.qmd) for every option, and the [Examples](examples.qmd) for the reference forms rendered. diff --git a/docs/reference.qmd b/docs/reference.qmd index bd7c9bc..be1728e 100644 --- a/docs/reference.qmd +++ b/docs/reference.qmd @@ -8,14 +8,10 @@ description: "The complete gitlink configuration: the platforms, the reference f ```yaml filters: - - path: gitlink - at: post-quarto + - gitlink ``` -::: {.callout-important} -`post-quarto` is required. -Quarto's own cross-references, `@fig-something` among them, have to be resolved before this filter reads the text. -::: +The extension registers the filter at `post-quarto`, so Quarto's own cross-references, `@fig-something` among them, are resolved before it reads the text. ## Options diff --git a/example.qmd b/example.qmd index ce36a2e..af186d4 100644 --- a/example.qmd +++ b/example.qmd @@ -11,8 +11,7 @@ format: toc: true # Extension configuration filters: - - path: gitlink - at: post-quarto + - gitlink extensions: gitlink: platform: github @@ -40,8 +39,7 @@ Add the extension to your document's YAML front matter: --- title: "My Document" filters: - - path: gitlink - at: post-quarto + - gitlink extensions: gitlink: platform: github # Platform: github, gitlab, codeberg, gitea, bitbucket