Initial commit
This commit is contained in:
commit
493d1932f8
18 files changed
+2755
No files matched your search
@@ -0,0 +1,4 @@
|
||||
module.exports = function(eleventyConfig) {
|
||||
eleventyConfig.addPlugin(require('./markdown'));
|
||||
eleventyConfig.addPlugin(require('@11ty/eleventy-plugin-rss'));
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
const markdownIt = require('markdown-it');
|
||||
const markdownItLinkAttributes = require('markdown-it-link-attributes');
|
||||
|
||||
const markdownLib = markdownIt({
|
||||
html: true,
|
||||
breaks: true,
|
||||
linkify: true,
|
||||
typographer: true
|
||||
}).use(markdownItLinkAttributes, [
|
||||
{
|
||||
// match external links
|
||||
matcher(href) {
|
||||
return href.match(/^https?:\/\//);
|
||||
},
|
||||
attrs: {
|
||||
target: '_blank',
|
||||
rel: 'noreferrer noopener'
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
||||
module.exports = function (eleventyConfig) {
|
||||
eleventyConfig.setLibrary('md', markdownLib);
|
||||
}
|
||||
Reference in new issue
Block a user