mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-20 12:37:01 +02:00
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:
parent
d1a27efe8c
commit
aa7430e168
7 changed files with 50 additions and 11 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue