10-print header works :)

I had to pin @thi.ng/hiccup to an earlier version because they stopped publishing CommonJS modules. There is [an issue tracking EcmaScript module support in 11ty](https://github.com/11ty/eleventy/issues/836) but it has not been fixed yet and other solutions broke unpredictably by messing with template inheritance.
This commit is contained in:
arne 2022-02-20 18:10:09 +01:00
commit 9024c00b1a
7 changed files with 67 additions and 20 deletions

View file

@ -1,4 +1,5 @@
const { DateTime } = require('luxon')
const header = require('./src/_helpers/header')
module.exports = function (config) {
config.setBrowserSyncConfig({
@ -10,6 +11,7 @@ module.exports = function (config) {
// template filters
config.addFilter('toJSON', obj => JSON.stringify(obj))
config.addFilter('toISODate', date => DateTime.fromJSDate(date).toISODate())
config.addFilter('header', header)
// returns classes to be used on <body>, given a page's url
config.addFilter('pageClasses', url => {