feat(v1): add 'slugPreprocessor' config option to allow users customize the hash links (#3124)

* fix(v1): remove HTML content from hash links

* fix one more test

* rewrite changes as new feature to prevent breaking changes
This commit is contained in:
Bartosz Kaszubowski 2020-07-28 14:17:28 +02:00 committed by GitHub
parent d1a27efe8c
commit aa7430e168
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 50 additions and 11 deletions

View file

@ -104,7 +104,7 @@ function mdToHtmlify(oldContent, mdToHtml, metadata, siteConfig) {
function getMarkup(rawContent, mdToHtml, metadata, siteConfig) {
// generate table of contents
let content = insertTOC(rawContent);
let content = insertTOC(rawContent, siteConfig.slugPreprocessor);
// replace any links to markdown files to their website html links
content = mdToHtmlify(content, mdToHtml, metadata, siteConfig);