fix: wikilinks normalization and various slugging fixes

This commit is contained in:
saberzero1
2026-04-17 00:35:28 +02:00
parent 6def58c0d0
commit 85563ffaab
7 changed files with 89 additions and 82 deletions

View File

@@ -52,7 +52,7 @@ This plugin accepts the following configuration options:
When enabled, this plugin renders a collapsible "Properties" panel before the page body. The panel displays selected frontmatter fields in a table with automatic type rendering:
- **Strings** are shown as plain text. [[Wikilinks]] and [markdown links](https://example.com) within strings are rendered as clickable links.
- **Strings** are shown as plain text. [[Wikilinks]] and [markdown links](https://example.com) within strings are rendered as clickable links. Wikilink targets are slugified the same way as body-content links (e.g. `[[My Note]]` resolves to `my-note`) and matching is case-insensitive to mirror Obsidian's behavior, so `[[MyNote]]`, `[[mynote]]`, and `[[MYNOTE]]` all point to the same page.
- **Arrays** are rendered as comma-separated lists.
- **Booleans** are rendered as disabled checkboxes.
- **Numbers** are rendered in a monospace font.
@@ -81,24 +81,24 @@ quartz-properties-collapse: false
Quartz supports the following frontmatter fields. Where multiple keys are listed, they are aliases — the first matching key is used.
| Field | Keys | Description |
| ------------------ | ------------------------------------------------- | ------------------------------------------------------------------ |
| Title | `title` | Page title. Falls back to filename if empty. |
| Description | `description` | Page description for metadata and search. |
| Tags | `tags`, `tag` | Categorization tags. Automatically slugified. |
| Aliases | `aliases`, `alias` | Alternative names for the page, used for link resolution. |
| Permalink | `permalink` | Custom URL slug. Also added to aliases. |
| CSS classes | `cssclasses`, `cssclass` | CSS classes applied to the page body. |
| Social image | `socialImage`, `image`, `cover` | Image used for social media previews. |
| Social description | `socialDescription` | Description used specifically for social media previews. |
| Created date | `created`, `date` | When the note was created. |
| Modified date | `modified`, `lastmod`, `updated`, `last-modified` | When the note was last modified. Falls back to `created` if unset. |
| Published date | `published`, `publishDate`, `date` | When the note was published. |
| Publish | `publish` | Whether the note should be published. |
| Draft | `draft` | Whether the note is a draft. |
| Comments | `comments` | Whether comments are enabled for the note. |
| Language | `lang` | Language code for the note. |
| Enable TOC | `enableToc` | Whether to show the table of contents. |
| Field | Keys | Description |
| ------------------ | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Title | `title` | Page title. Falls back to filename if empty. |
| Description | `description` | Page description for metadata and search. |
| Tags | `tags`, `tag` | Categorization tags. Slugified the same way as file paths: spaces become `-`, `&` becomes `-and-`, `%` becomes `-percent`, and tags are lowercased so that `#MyTag` and `#mytag` resolve to the same tag page (matching Obsidian). |
| Aliases | `aliases`, `alias` | Alternative names for the page, used for link resolution. |
| Permalink | `permalink` | Custom URL slug. Also added to aliases. |
| CSS classes | `cssclasses`, `cssclass` | CSS classes applied to the page body. |
| Social image | `socialImage`, `image`, `cover` | Image used for social media previews. |
| Social description | `socialDescription` | Description used specifically for social media previews. |
| Created date | `created`, `date` | When the note was created. |
| Modified date | `modified`, `lastmod`, `updated`, `last-modified` | When the note was last modified. Falls back to `created` if unset. |
| Published date | `published`, `publishDate`, `date` | When the note was published. |
| Publish | `publish` | Whether the note should be published. |
| Draft | `draft` | Whether the note is a draft. |
| Comments | `comments` | Whether comments are enabled for the note. |
| Language | `lang` | Language code for the note. |
| Enable TOC | `enableToc` | Whether to show the table of contents. |
## API