Skip to content

Commit 6475155

Browse files
committed
fix(#160): Use toml frontmatter to avoid indentation issues.
1 parent d375679 commit 6475155

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

_src/year.njk

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
---
2-
pagination:
3-
data: participants
4-
size: 1
5-
alias: year
6-
permalink: /{{ year }}.html
1+
---toml
2+
[pagination]
3+
data = "participants"
4+
size = 1
5+
alias = "year"
6+
permalink = "/{{ year }}.html"
77
---
88

99
{# See `pagination.before` in separate year.11tydata.js. #}

eleventy.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ export default function (eleventyConfig) {
1818
// Allow to parse Toml files for Global data.
1919
eleventyConfig.addDataExtension("toml", (contents) => toml.parse(contents));
2020

21-
eleventyConfig.addFilter("getParticipantDisplayName", (participant) => {
21+
eleventyConfig.setFrontMatterParsingOptions({
22+
engines: {
23+
toml: toml.parse.bind(toml),
24+
},
25+
});
26+
27+
eleventyConfig.addFilter('getParticipantDisplayName', (participant) => {
2228
// TODO: Either get current year’s website, or use the filename.
2329
const websiteURL = participant.websites[0].url;
2430

0 commit comments

Comments
 (0)