syntax highlighting

This commit is contained in:
Rik Berkelder 2025-02-13 00:02:33 +01:00
parent ccf20da6c1
commit b5c8a022fc
5 changed files with 108 additions and 52 deletions

View file

@ -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");
}