Open skippy opened 2 years ago
here is some code that sets it up right but the {{configs.site_name}}
is stripped out of the raw string somewhere in the pre-processing step.
const mdRender = require('markdown-it')({linkify: true})
.use(require('markdown-it-attrs'));
const nunjucks = require('nunjucks')
eleventyConfig.addFilter("markdownify", function(rawString) {
let str = nunjucks.renderString(rawString, this.ctx);
return mdRender.render(str);
});
another place this comes up is on the burn-permits page, where we show configurable dates within the yml template
right now, anything that is stored in 11ty data files are not run through nunjucks; this means variables within other data files, such as
stats.json
andconfigs.json
aren't available.I ran into this issue but was able to work around for now, but do we need this?