39 lines
804 B
JavaScript
39 lines
804 B
JavaScript
const mdit = require('markdown-it')
|
|
const mditFoot = require('markdown-it-footnote')
|
|
const pluginWebc = require('@11ty/eleventy-plugin-webc')
|
|
|
|
module.exports = function(config) {
|
|
|
|
// markdown parser
|
|
const markdownLib = mdit({
|
|
html: true,
|
|
breaks: false,
|
|
linkify: true
|
|
}).use(mditFoot).disable('code')
|
|
|
|
config.setLibrary('md', markdownLib)
|
|
|
|
// webc templates
|
|
config.addPlugin(pluginWebc, {
|
|
components: 'src/_includes/components/*.webc'
|
|
})
|
|
|
|
// admin files
|
|
config.addPassthroughCopy({
|
|
'src/assets': '/',
|
|
'src/admin': 'admin',
|
|
})
|
|
|
|
config.setServerPassthroughCopyBehavior("passthrough")
|
|
|
|
return {
|
|
markdownTemplateEngine: 'md',
|
|
dir: {
|
|
input: "src/_content",
|
|
includes: '../_includes',
|
|
data: '../_data',
|
|
output: "_site"
|
|
}
|
|
}
|
|
};
|