feat: set page title from filename#74
Merged
jfernandez merged 1 commit intojfernandez:mainfrom Apr 2, 2026
Merged
Conversation
The browser tab always shows 'Markdown Preview' regardless of content. Use the filename (without extension) as the page title. This is passed from the server as a template variable so it works in both single-file and directory mode.
4a2bf94 to
6b34aeb
Compare
Owner
|
Hey, the code looks good but the PR title and description don't match what it actually does. The title says "from first h1 heading" and the body talks about a JS function extracting h1, but the code sets the title from the filename stem server-side via a template variable. No JS involved. Your commit message ("set page title from filename") is the accurate one. Can you update the PR title and description to match? |
Contributor
Author
|
Sorry about the confusion — I updated the title and description to match what the code actually does. Thanks for catching that. |
jfernandez
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The browser tab always shows "Markdown Preview" regardless of which document is open. This sets the page title to the filename stem via a template variable on the server side, so each file gets a meaningful tab title.
In directory mode, the title updates on each navigation since the server renders a fresh page per file.
Since live reload does a full page reload, the title also updates automatically when switching files.