diff --git a/eleventy.config.js b/eleventy.config.js index d877bd46..7653a3f2 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -61,6 +61,14 @@ module.exports = function (eleventyConfig) { // Shortcode: tag eleventyConfig.addShortcode('cite', (str) => `${str}`); + // Paired shortcode: Manual heading anchor + eleventyConfig.addPairedShortcode('headingAnchor', (title, hLevel, id) => { + return `
+ ${title} + +
`; + }); + return { dir: { input: "src" diff --git a/src/_includes/main/changelogs-list.njk b/src/_includes/main/changelogs-list.njk index b593b8ca..73da18d3 100644 --- a/src/_includes/main/changelogs-list.njk +++ b/src/_includes/main/changelogs-list.njk @@ -1,7 +1,7 @@ {% for log in changelogList | reverse %} -
-

{{ log.date | formatDate }}

- -
+ {% headingAnchor 2, log.fileSlug %} + {{ log.date | formatDate }} + {% endheadingAnchor %} + {{ log.templateContent | safe }} {%- endfor %}