syntax highlighting
This commit is contained in:
parent
ccf20da6c1
commit
b5c8a022fc
5 changed files with 108 additions and 52 deletions
|
@ -1,6 +1,8 @@
|
|||
import * as sass from "sass";
|
||||
import { eleventyImageTransformPlugin } from "@11ty/eleventy-img";
|
||||
import { DateTime } from "luxon";
|
||||
import markdownit from "markdown-it";
|
||||
import syntaxHighlight from '@11ty/eleventy-plugin-syntaxhighlight';
|
||||
|
||||
export default async function (eleventyConfig) {
|
||||
// Filters
|
||||
|
@ -37,6 +39,18 @@ export default async function (eleventyConfig) {
|
|||
`;
|
||||
});
|
||||
|
||||
//Markdown
|
||||
const md = markdownit({
|
||||
html: true,
|
||||
breaks: true
|
||||
});
|
||||
|
||||
eleventyConfig.setLibrary("md", md);
|
||||
|
||||
// Syntax Highlighting
|
||||
eleventyConfig.addPlugin(syntaxHighlight);
|
||||
|
||||
//File passthrough
|
||||
eleventyConfig.addPassthroughCopy("content/robots.txt");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue