diff options
Diffstat (limited to 'gulpfile.js')
-rw-r--r-- | gulpfile.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gulpfile.js b/gulpfile.js index 37a07c5..8fd7481 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -3,6 +3,9 @@ var gulp = require('gulp'), hljs = require('highlight.js'), md = require('jstransformer')(require('jstransformer-markdown-it')), + md_anchor = require('markdown-it-anchor'), + md_footnote = require('markdown-it-footnote'), + md_toc = require('markdown-it-table-of-contents'), minifyhtml = require('gulp-minify-html'), minifyjs = require('gulp-minify'), notify = require('gulp-notify'), @@ -56,8 +59,20 @@ function html() { return ''; }, + html: true, langPrefix: 'lang-', linkify: true, + plugins: [ + [md_anchor, { + permalink: md_anchor.permalink.ariaHidden({ + placement: 'before' + }), + }], + md_footnote, + [md_toc, { + containerHeaderHtml: '<h1>Contents</h1>', + }], + ], }, options); return md.render(text, options).body; } |