fix: markdown's footnote

This commit is contained in:
Ryan Yin 2023-06-24 01:23:37 +08:00
parent f20e69620e
commit 3e5a04a36d
3 changed files with 15 additions and 6 deletions

View file

@ -6,12 +6,9 @@ export default defineConfig({
theme: "material-theme-palenight",
lineNumbers: true,
// adjust how header anchors are generated,
// useful for integrating with tools that use different conventions
anchor: {
slugify(str) {
return encodeURIComponent(str);
},
config: (md) => {
// use more markdown-it plugins!
md.use(require("markdown-it-footnote"));
},
},

View file

@ -6,5 +6,8 @@
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs"
},
"dependencies": {
"markdown-it-footnote": "^3.0.3"
}
}

View file

@ -1,5 +1,10 @@
lockfileVersion: '6.0'
dependencies:
markdown-it-footnote:
specifier: ^3.0.3
version: 3.0.3
devDependencies:
vitepress:
specifier: 1.0.0-beta.3
@ -681,6 +686,10 @@ packages:
resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==}
dev: true
/markdown-it-footnote@3.0.3:
resolution: {integrity: sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w==}
dev: false
/minisearch@6.1.0:
resolution: {integrity: sha512-PNxA/X8pWk+TiqPbsoIYH0GQ5Di7m6326/lwU/S4mlo4wGQddIcf/V//1f9TB0V4j59b57b+HZxt8h3iMROGvg==}
dev: true