Fix doc page

This commit is contained in:
syuilo 2020-03-28 11:32:19 +09:00
parent 6be127e18b
commit 27733e2119
3 changed files with 11 additions and 0 deletions

View File

@ -169,6 +169,7 @@
"lolex": "5.1.2", "lolex": "5.1.2",
"lookup-dns-cache": "2.1.0", "lookup-dns-cache": "2.1.0",
"markdown-it": "10.0.0", "markdown-it": "10.0.0",
"markdown-it-anchor": "5.2.5",
"mocha": "7.0.1", "mocha": "7.0.1",
"moji": "0.5.1", "moji": "0.5.1",
"ms": "2.1.2", "ms": "2.1.2",

View File

@ -18,6 +18,7 @@
import Vue from 'vue'; import Vue from 'vue';
import { faFileAlt } from '@fortawesome/free-solid-svg-icons' import { faFileAlt } from '@fortawesome/free-solid-svg-icons'
import MarkdownIt from 'markdown-it'; import MarkdownIt from 'markdown-it';
import MarkdownItAnchor from 'markdown-it-anchor';
import i18n from '../i18n'; import i18n from '../i18n';
import { url, lang } from '../config'; import { url, lang } from '../config';
import MkLink from '../components/link.vue'; import MkLink from '../components/link.vue';
@ -26,6 +27,10 @@ const markdown = MarkdownIt({
html: true html: true
}); });
markdown.use(MarkdownItAnchor, {
slugify: (s) => encodeURIComponent(String(s).trim().replace(/\s+/g, '-'))
});
export default Vue.extend({ export default Vue.extend({
i18n, i18n,

View File

@ -6111,6 +6111,11 @@ map-visit@^1.0.0:
dependencies: dependencies:
object-visit "^1.0.0" object-visit "^1.0.0"
markdown-it-anchor@5.2.5:
version "5.2.5"
resolved "https://registry.yarnpkg.com/markdown-it-anchor/-/markdown-it-anchor-5.2.5.tgz#dbf13cfcdbffd16a510984f1263e1d479a47d27a"
integrity sha512-xLIjLQmtym3QpoY9llBgApknl7pxAcN3WDRc2d3rwpl+/YvDZHPmKscGs+L6E05xf2KrCXPBvosWt7MZukwSpQ==
markdown-it@10.0.0: markdown-it@10.0.0:
version "10.0.0" version "10.0.0"
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-10.0.0.tgz#abfc64f141b1722d663402044e43927f1f50a8dc" resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-10.0.0.tgz#abfc64f141b1722d663402044e43927f1f50a8dc"