Install markdown-it-figure

This commit is contained in:
Helen Chong 2024-05-06 19:44:29 +08:00
parent 313da3be27
commit ac2ad7ffc8
3 changed files with 3 additions and 2 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -13,7 +13,6 @@ const slugify = require("slugify");
// Configure markdown-it plugins // Configure markdown-it plugins
const markdownIt = require("markdown-it"); const markdownIt = require("markdown-it");
const markdownItAnchor = require("markdown-it-anchor"); const markdownItAnchor = require("markdown-it-anchor");
const markdownItAttr = require("markdown-it-attrs");
module.exports = function (eleventyConfig) { module.exports = function (eleventyConfig) {
// Copy files // Copy files
@ -81,7 +80,8 @@ module.exports = function (eleventyConfig) {
html: true, html: true,
}) })
.use(markdownItAnchor, markdownItAnchorOptions) .use(markdownItAnchor, markdownItAnchorOptions)
.use(markdownItAttr); .use(require("markdown-it-attrs"))
.use(require('markdown-it-figure'));
/* This is the part that tells 11ty to swap to our custom config */ /* This is the part that tells 11ty to swap to our custom config */
eleventyConfig.setLibrary("md", markdownLibrary); eleventyConfig.setLibrary("md", markdownLibrary);

View File

@ -22,6 +22,7 @@
"install": "^0.13.0", "install": "^0.13.0",
"markdown-it-anchor": "^8.6.7", "markdown-it-anchor": "^8.6.7",
"markdown-it-attrs": "^4.1.6", "markdown-it-attrs": "^4.1.6",
"markdown-it-figure": "^0.2.0",
"slugify": "^1.6.6" "slugify": "^1.6.6"
} }
} }