Description
Feature request
We can add a new option called ignoreCompileLinks
or similar.
What problem does this feature solve?
There is currently a way to ignore links with markdown syntax:
https://docsify.js.org/#/helpers?id=ignore-to-compile-link
However, this can be cumbersome if there are a lot of links. Also, if loading external markdown files, we have no control over the content.
There is already a similar option called crossOriginLinks
:
https://docsify.js.org/#/configuration?id=crossoriginlinks
but that went away in #1967, and that option is not exactly the same. We might want to ignore certain links, and those links may or may not be cross-origin.
Non-cross-origin links can include certain URLs that are supposed to load a new page. F.e. example.com/usage/foo
might load markdown with Docsify, but example.com/other/blah
might load an entirely different non-Docsify page, or proxy to another domain.
Live example: https://docs.lume.io/three-meshline/. This site loads the content from https://lume.github.io/three-meshline/ due to my vercel proxy configuration in vercel.json
(cc @jhildenbiddle you may find this interesting based on recent chat). Subsequently, this loaded content has all sorts of /three-meshline/foo
links, but Docsify tries to handle them directly. Instead, I would like to have Docsify ignore any three-meshline/*
links, and have the browser open those pages directly.
I could modify all those links myself such that they are of the format [foo](./bar ":ignore")
, because I do own those pages, but a regex in my docsify config would be nicer.
What does the proposed API look like?
window.$docsify = {
ignoreCompileLinks: [
'/foo/bar', // string
/.*foo\/.*/, // regex
]
}
How should this be implemented in your opinion?
In addition to markdown :ignore
syntax, the compiler will look in this array and ignore any links that are matched.
Are you willing to work on this yourself?
Yeah