Skip to content

Show a document's front matter behind a setting, and name the document by its title - #124

Merged
jeff377 merged 3 commits into
mainfrom
claude/front-matter-120
Dec 5, 2026
Merged

jeff377 merged 3 commits into
mainfrom
claude/front-matter-120

Conversation

@jeff377

@jeff377 jeff377 commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Closes #120

What changes

  • Polhem.Markdown.Avalonia 0.10.0 → 0.11.0.
  • Settings > General gets a check box, Show front matter (title, date, tags) at the top of a document, off by default. When it is on, Read, the preview beside the editor, and File > Export (HTML and PDF) turn on MarkdownOptions.ShowFrontMatter, so a Hugo, Jekyll or Docusaurus post shows its title, its date, author and tags, and its other fields behind "More". When it is off, all three look as they did with 0.10.0. A change applies to open documents at once. The check box and the "More" text (Viewer_FrontMatterMore) are translated in every interface language.
  • Whatever the setting, the front matter's title, when there is one, names the document in its tab, the window title, the Window menu, File > Open Recent, and an export's suggested file name and title. Without one, nothing changes. A tab's tooltip still shows the file's path.
    • The tab and window follow the text as it is edited, as the preview does.
    • Open Recent keeps the title of the text as last opened or saved (a new optional title field in the recent list's settings), so unsaved edits do not rename an entry.
    • An export's suggested name leaves out the characters a file name may not hold on macOS, Windows or Linux.
    • The PDF is titled with the front matter's title, which the package does not take itself (it uses the first heading, and the front matter title is not one). MarkdownHtml.ToPage already takes it.
  • The AI chat still sees the whole text, front matter included; the editor still shows it as code.
  • README.md and README.zh-TW.md describe it under Read: hidden by default, shown with the setting.

Checked

  • dotnet build and dotnet test (Release): 580 passed, 3 skipped.
  • In a packaged build on macOS:
    • Setting off (the default): a Hugo post's front matter is hidden in Read, the preview and an exported PDF, which is still titled and named after the front matter's title; the title is in the tab and window.
    • Setting on: a Hugo post with YAML front matter and one with TOML front matter show the block in Read and in the preview, and in their exported HTML and PDF. In the PDF the other fields are shown open, with no "More" toggle.
    • Turning the setting on and off changes the open document at once.
    • A document without front matter looks as before.

…name the document by its title

Polhem.Markdown.Avalonia 0.11.0 shows YAML and TOML front matter. Read, the preview, and the HTML and PDF exports turn it
on, and the viewer's More toggle is translated in every interface language.

The front matter's title, when there is one, names the document in its tab, the window title, the Window menu, File >
Open Recent, and an export's suggested file name and title. The tab and window follow the text as it is edited; Open
Recent takes the title when the document is opened or saved. A tab's tooltip still shows the file's path.

Closes #120
@jeff377
jeff377 enabled auto-merge (squash) December 5, 2026 07:02
@jeff377
jeff377 disabled auto-merge December 5, 2026 07:14
Sites that publish Markdown posts do not show their front matter in the text, and showing it gets in the way of
reading. Settings > General gets a check box, off by default, that shows it in Read, the preview and the exports; it
applies to open documents at once. The front matter's title names the document whatever the setting.
@jeff377 jeff377 changed the title Show a document's front matter in Read, the preview and exports, and name the document by its title Show a document's front matter behind a setting, and name the document by its title Dec 5, 2026
@jeff377
jeff377 enabled auto-merge (squash) December 5, 2026 07:23
@jeff377
jeff377 merged commit 79edff6 into main Dec 5, 2026
6 checks passed
@jeff377
jeff377 deleted the claude/front-matter-120 branch December 5, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show a document's front matter in Read and exports, and use its title

1 participant