26 lines
729 B
JavaScript
26 lines
729 B
JavaScript
const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight')
|
|
const markdownIt = require('markdown-it')
|
|
const markdownItAnchor = require('markdown-it-anchor')
|
|
|
|
module.exports = function(eleventyConfig) {
|
|
// Copy these static files to _site folder
|
|
eleventyConfig.addPassthroughCopy('src/assets')
|
|
eleventyConfig.addPassthroughCopy('src/manifest.json')
|
|
|
|
const md = markdownIt({ html: true, linkify: true })
|
|
md.use(markdownItAnchor, {
|
|
level: [1, 2],
|
|
permalink: markdownItAnchor.permalink.headerLink({
|
|
safariReaderFix: true,
|
|
class: 'header-anchor',
|
|
})
|
|
})
|
|
eleventyConfig.setLibrary('md', md)
|
|
|
|
return {
|
|
markdownTemplateEngine: 'liquid',
|
|
dir: {
|
|
input: 'src'
|
|
}
|
|
}
|
|
} |