Add frontmatter support

Created on 12 March 2025, 7 months ago

Problem/Motivation

In its current form the module renders tags, author, and other metadata as straightforward text and links:

by [Umami](/en/user/6 "View user profile.") 7th March 2025 
 Tags
[Vegan](/en/tags/vegan)
[Vegetarian](/en/tags/vegetarian)
[Oats](/en/tags/oats)
[Breakfast](/en/tags/breakfast)
[Dessert](/en/tags/dessert)

This is fine for most LLM input tasks. However, it the MarkDown is supposed to be fed into a static site generator, then metadata be in frontmatter format.

Steps to reproduce

Request any node via its MD path.

Proposed resolution

As an option, output metadata as frontmatter between triple dashes.
You can use FrontYAML to support the output.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States christophweber

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @christophweber
  • πŸ‡ΊπŸ‡ΈUnited States christophweber

    Quick update: We are tackling this by tying into core and Metatag module output. Basically, everything that is output in HTML <head> under a <meta> tag will be reformatted to MD frontmatter. There will be a select a few exceptions for HTML-specific metatags, such as viewport.

    The basic idea is twofold:
    1. We want to preserve feature parity between HTML and MD output.
    2. People who care about metadata can and should configure everything in Metatag module already - not just for SEO, but to provide comprehensive metadata coverage of their content. No need to reinvent the wheel.

    We may eventually also consider other solutions and are open to ideas.

Production build 0.71.5 2024