BADGE 2.5.0
Installation
quarto add mcanouil/quarto-badge@2.5.0Changelog
New Features
- feat: Add
iconconfiguration option for a Bootstrap icon prefix shown before the badge value. - feat: Add
targetconfiguration option for the link target attribute, automatically settingrel="noopener noreferrer"for_blank. - feat: Add
titleconfiguration option for a hover tooltip, with{{value}}placeholder support. - feat: Validate
colouragainst CSS named colours, hex,rgb/rgba,hsl/hsla,hwb,lab,lch,oklab,oklch, andcolor()values; invalid values are warned and ignored. - feat: Validate
href(after{{value}}substitution) and reject malformed or disallowed-scheme URLs with a warning. - feat: Support per-document badge overrides via the
badge-overridesmetadata key; entries override matchingkeyvalues from the base configuration and new keys are appended.
Bug Fixes
- fix: Warn when the badge shortcode is invoked with a key that is not configured (previously rendered an empty element silently).
- fix: HTML-escape the badge value,
hrefattribute,{{value}}substitution result, andclass/titleattributes to prevent attribute injection.
Refactoring
- refactor: Synchronise shared modules (
string.lua,logging.lua,metadata.lua,pandoc-helpers.lua) with the canonical source and addcolour.luafor colour validation.
Documentation
- docs: Document new configuration options, validation behaviour, and document-level overrides in README and example.
- docs: Extend
_schema.ymlwith the new properties and thebadge-overrideskey.
What's Changed
- fix(badge): warn on unknown keys, escape attributes, validate inputs by @mcanouil in #34
- ci: bump version for release 🚀 by @mcanouil-dev[bot] in #35
Full Changelog: 2.4.1...2.5.0