matrix-spec/layouts/docs/changelog.checklist.md
Kévin Commaille a34a89a073
Generate changelog release info with Hugo rather than when generating changelog
Allows to have more control on the output, like showing a link to the checklist on the unstable changelog,
and using only markdown in the checklist output format.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-12-15 16:54:58 +01:00

35 lines
1 KiB
Markdown

{{- /*
Template to render a page with a `changelog` layout as a markdown checklist.
This transforms the markdown source of the changelog to change list items to
checklist items.
If it is not the unstable changelog, this also adds a table at the top of
the page with information about the Matrix spec release:
* A link to the matrix-spec repository at the time of the release, with the
version taken from the `linkTitle` in the frontmatter of the page.
* The date of the release, taken from the `date` in the frontmatter of the
page.
*/ -}}
{{ $version := lower .LinkTitle -}}
# Matrix Specification {{ .Title }}
{{ if ne $version "unstable" -}}
{{- /*
Most markdown parsers require the header to recognize a markdown table,
so add an empty header.
*/ -}}
| | |
|---|---|
| Git commit | {{ printf "https://github.com/matrix-org/matrix-spec/tree/%s" $version }} |
| Release date | {{ .Date | time.Format ":date_long" }} |
{{ end -}}
{{ .RawContent | replaceRE "\n- " "\n- [ ] " }}