Install Eleventy plugin for Vento

This commit is contained in:
Leilukin 2025-05-03 20:06:18 +08:00
parent b0d3641de1
commit eeedd5d657
3 changed files with 8 additions and 0 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -6,6 +6,7 @@ import pluginSyntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight";
import pluginEmbedEverything from "eleventy-plugin-embed-everything"; import pluginEmbedEverything from "eleventy-plugin-embed-everything";
import pluginWordcount from "eleventy-plugin-wordcount-extended"; import pluginWordcount from "eleventy-plugin-wordcount-extended";
import pluginTOC from "@uncenter/eleventy-plugin-toc"; import pluginTOC from "@uncenter/eleventy-plugin-toc";
import { VentoPlugin } from 'eleventy-plugin-vento';
// Custom Configurations // Custom Configurations
import markdownItConfig from "./src/_config/markdown-it.js"; import markdownItConfig from "./src/_config/markdown-it.js";
@ -48,6 +49,12 @@ export default function(eleventyConfig) {
eleventyConfig.addBundle("css"); eleventyConfig.addBundle("css");
eleventyConfig.addBundle("js", { toFileDirectory: "assets/js" }); eleventyConfig.addBundle("js", { toFileDirectory: "assets/js" });
// ----- Vento plugin for Eleventy
// Must be loaded after plugins that modify filters
eleventyConfig.addPlugin(VentoPlugin, {
autotrim: true,
});
return { return {
markdownTemplateEngine: "njk", markdownTemplateEngine: "njk",
htmlTemplateEngine: "njk", htmlTemplateEngine: "njk",

View File

@ -23,6 +23,7 @@
"@uncenter/eleventy-plugin-toc": "^1.0.3", "@uncenter/eleventy-plugin-toc": "^1.0.3",
"@zachleat/details-utils": "^2.0.2", "@zachleat/details-utils": "^2.0.2",
"eleventy-plugin-embed-everything": "^1.21.0", "eleventy-plugin-embed-everything": "^1.21.0",
"eleventy-plugin-vento": "^4.2.1",
"eleventy-plugin-wordcount-extended": "^0.2.1", "eleventy-plugin-wordcount-extended": "^0.2.1",
"install": "^0.13.0", "install": "^0.13.0",
"markdown-it-anchor": "^9.2.0", "markdown-it-anchor": "^9.2.0",