Skip to content

Adding Metadata to Literate Markdown Files

module Demo.Literate.Metadata where

The source file for this literate Markdown webpage starts with the following metadata:

---
updated: 2026-08-19
created: 2026-08-09
authors:
  - pdmosses
tags:
  - front matter
  - Markdown
  - metadata
---

Metadata is not part of Markdown, but often supported or required by website builders.

Metadata is written in YAML, enclosed by lines consisting of ---, and prepended to Markdown as so-called front matter.

Tags

When the website configuration file includes the tags plugin, each webpage with a tags list in its metadata displays the tags.

You can create a page that includes a global tags index by adding the following HTML comment with ... replaced by material/tags:

<!-- ... -->

Currently, only the present page has metadata that includes a tags list, as shown on the Tags page.

Date and authors

The MaterialX theme supports adding dates and authors metadata via the built-in plugin document-dates.

However, pages generated by Agda-Pages should display only the dates and authors from the metadata of the corresponding literate Agda Markdown source files. A future version of Agda-Pages may support this restriction.