Skip to content

Export metadata to YAML frontmatter #212

Open
@infotexture

Description

@infotexture

Currently, YAML frontmatter can be read from Markdown input to specify certain metadata elements for the DITA prolog.

But there doesn’t appear to be a (documented) way to export this (or other) metadata to Markdown output.

Additional metadata

Various Markdown publishing systems and static site generators use YAML metadata to define things like page titles, shorter navigation titles, descriptions, and ToC order.

Since this information is available in the DITA source, it would be useful if it could be written to the YAML metadata when generating Markdown output.

---
title: About this project
description: Learn more about the project I’m working on.
---

As each publishing system supports different keys, there would probably need to be a way to configure mappings from various DITA elements to YAML keys, or additional output formats (similar to markdown_gitbook) that bake in mappings for certain systems.

Examples

↓Element \ SSG → Docusaurus Starlight
<title> title title
<shortdesc> description description
<navtitle> sidebar_label sidebar-label
ToC order sidebar_position sidebar-order

Note

I realize this will require further discussion and specification, just filing this to make sure it's on the radar, and provide a place for that discussion to happen in public.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions