Add back heading anchors via markdown-it-anchors plugin
This commit is contained in:
parent
2bf11e6604
commit
d2bd13da46
|
@ -11,6 +11,7 @@
|
|||
"ace-builds": "~1.2.3",
|
||||
"parsleyjs": "~2.3.10",
|
||||
"markdown-it": "~7.0.0",
|
||||
"markdown-it-anchor": "https://wzrd.in/standalone/markdown-it-anchor@2.5.0",
|
||||
"js-yaml": "~3.6.0",
|
||||
"store-js": "~1.3.16",
|
||||
"bootswatch-dist": "3.3.6-flatly",
|
||||
|
|
|
@ -230,6 +230,7 @@ assets.register('main.js',
|
|||
'vendor/handlebars/handlebars.js',
|
||||
'vendor/js-yaml/dist/js-yaml.js',
|
||||
'vendor/markdown-it/dist/markdown-it.js',
|
||||
'vendor/markdown-it-anchor/index.0',
|
||||
'js/html-sanitizer-minified.js', # don't minify?
|
||||
'vendor/highlightjs/highlight.pack.js',
|
||||
'vendor/parsleyjs/dist/parsley.js',
|
||||
|
|
|
@ -52,6 +52,14 @@ var markdownit = window.markdownit({
|
|||
|
||||
return ''; // use external default escaping
|
||||
}
|
||||
}).use(markdownItAnchor, {
|
||||
level: 1,
|
||||
// slugify: string => string,
|
||||
permalink: false,
|
||||
// renderPermalink: (slug, opts, state, permalink) => {},
|
||||
permalinkClass: 'header-anchor',
|
||||
permalinkSymbol: '¶',
|
||||
permalinkBefore: false
|
||||
});
|
||||
|
||||
// Markdown Renderer
|
||||
|
|
Loading…
Reference in a new issue