-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not get right routes with multi sections #2370
Comments
Hi @L-Super , I can not find the
I didn't see any path similar as you mentioned:
But I found the So, I try to work on it directly to make it works, it is similar to rewrite the path ( include File path). What I did:
![]()
window.$docsify = {
alias:{
'\/CPP-Concurrency-in-Action-2nd-Edition.*(?:.*\/content\/(.*))': '/CPP-Concurrency-in-Action-2nd-Edition/content/$1'
}
} Besides, correct the hash url in browser as well. window.$docsify = {
plugins: [
function(hook, vm){
hook.beforeEach(content=>{
const cpp = "\/CPP-Concurrency-in-Action-2nd-Edition.*(?:.*\/content\/(.*))"
const regex = new RegExp(`^${cpp}$`)
let path = window.location.hash && window.location.hash.substring(1)
if(regex.test(path)){
path = '/CPP-Concurrency-in-Action-2nd-Edition/content/'+path.match(regex)[1]
history.replaceState(null, null, `#${path}`);
}
})
}
]
} TBH, It works but so cumbersome... |
|
Bug acknowledged. Tracking with #1891. |
I placed this repo under the docs folder and renamed SUMMARY.md to guide.md, while my directory structure for docs is as follows:

index.html:
root guide.md:
Directory structure:
When I switch between different sections from the left side, the URL shows an incorrect path.
Current behaviour:
Expected behaviour:
Originally posted by @L-Super in #1891 (comment)
The text was updated successfully, but these errors were encountered: