note-properties/CHANGELOG.md
saberzero1 3539cf1e6a
fix: slugify wikilinks in frontmatter to prevent %20 in hrefs
Wikilinks appearing in frontmatter property strings (e.g. 'related:
"[[My Note]]"') were rendered with their raw target passed
directly to resolveRelative, leaving the space intact. The browser
then percent-encoded it as %20 in the rendered href, producing
broken links like './My%20Note' that never resolve.

The root cause was in renderTextWithLinks (NoteProperties.tsx):
the matched wikilink target went straight into resolveRelative
without going through slugifyFilePath, so spaces, ampersands, and
other characters that should be slugified survived into the href.
extractLinksFromValue (transformer.ts) had the same issue: it
stored raw target strings in file.data.frontmatterLinks instead
of canonical slugs.

Adds a shared slugifyWikilinkTarget helper in util/path.ts that
mirrors the slug+anchor contract CrawlLinks uses for body-content
links, so frontmatter wikilinks and body wikilinks now produce
identical hrefs. Both NoteProperties.tsx and the transformer's
extractLinksFromValue now go through this helper.

Also replaces the plugin's local slugTag/slugifyFilePath/
getFileExtension helpers with the shared @quartz-community/utils
versions. This eliminates slugification drift between plugins and
ensures that note-properties honors the same case-insensitive
matching that the rest of the Quartz ecosystem uses.

BREAKING CHANGE: tag URLs and frontmatter-wikilink slugs are now
lowercased (inherited from utils' case-insensitive matching).
Tags #MyTag, #mytag, and #MYTAG collapse into a single tag page
tags/mytag.
2026-04-16 22:22:10 +02:00

958 B

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased]

Added

  • Initial Quartz community plugin template.

Fixed

  • Frontmatter wikilinks containing spaces are now correctly slugified instead of rendering with %20 in the href. [[My Note]] in a frontmatter property now renders as ./my-note instead of ./My%20Note.

Changed

  • BREAKING (inherited from @quartz-community/utils): tag URLs and frontmatter-wikilink slugs are now lowercased to match Obsidian's case-insensitive matching. Tags #MyTag, #mytag, and #MYTAG collapse into a single tag page tags/mytag.
  • Replaced the plugin's local slugification helpers with the shared @quartz-community/utils versions to eliminate drift across the Quartz ecosystem.