-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(gnoweb): add metadata to md content #3797
base: master
Are you sure you want to change the base?
feat(gnoweb): add metadata to md content #3797
Conversation
🛠 PR Checks Summary🔴 Pending initial approval by a review team member, or review from tech-staff Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
Could you also add the front matter to some example realm to showcase the usage? 🙏 |
Fixes #3333
This PR introduces a way to customize HTML
head
metadata (title
,description
, and maybe soon,canonical
) from realm markdown content. It adds afront-matter
option that can be used at the very top of any realm markdown file. This front-matter is then read by our Markdown parser, Goldmark, to populate theTitle
andDescription
fields in gnoweb.The PR provides default content where these fields were previously blank and maintains a fallback setup using h.Static.Domain + " - " + gnourl.Path for the
Title
.Additionally, regardless of the provided Title, it will always be followed by
- gnourl.Path
(- gno.land
in our case).For now, only
Title
andDescription
are supported. Any other variables in the front-matter are ignored.Usage example: