feat: add syntax highlighting plugin and styles for code blocks
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
module.exports = function(eleventyConfig) {
|
||||
const { createProxyMiddleware } = require('http-proxy-middleware');
|
||||
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
|
||||
|
||||
// Pass through static assets from the "src" directory
|
||||
eleventyConfig.addPassthroughCopy("src/css");
|
||||
@@ -10,6 +11,8 @@ module.exports = function(eleventyConfig) {
|
||||
eleventyConfig.addPassthroughCopy({ 'src/robots.txt': '/robots.txt' });
|
||||
eleventyConfig.addPassthroughCopy({ 'src/sitemap.xml': '/sitemap.xml' });
|
||||
|
||||
eleventyConfig.addPlugin(syntaxHighlight);
|
||||
|
||||
// Add a filter for readable dates using vanilla JS
|
||||
eleventyConfig.addFilter("readableDate", dateObj => {
|
||||
// The toLocaleDateString method can be used to format dates
|
||||
|
Reference in New Issue
Block a user