Skip to content

Can not get right routes with multi sections #2370

Description

@Koooooo-7
 > > I am currently encountering issue 2, and I do not want to change my document directory structure. Is there any way to resolve this?

Hi @L-Super , could provide more details on your issue? and I may find a workaround to solve it before we settle this issue down. For path related issue, consider try alias or rewrite it in hooks instead of re- structure your docs totally.

I placed this repo under the docs folder and renamed SUMMARY.md to guide.md, while my directory structure for docs is as follows:
image

index.html:

<body><divid="app"></div><script>window.$docsify={name: '<span>docsify</span>',logo: '/favicon.svg',relativePath: true,loadSidebar: 'guide.md',auto2top: true,loadNavbar: true,subMaxLevel: 2,mergeNavbar: true,repo: 'https://github.com/L-Super',pagination: {previousText: '上一章节',nextText: '下一章节',crossChapter: true,crossChapterText: true,},loadFooter: true,baiduTjId: "xxxx",// 广告配置ads: [{img: 'resources/images/wx_qrcode.png'},],}window.$docsify.customPageTitle={prefix: false,// [optional] title prefix. default: false eg: prefix: "Application"suffix: "在线充电站",// [optional] title suffix. default: false eg: suffix: "v1.0.0"separator: '|',// [optional] separator for title eg: title-> prefix | title | suffixdebug: false,// [optional] should debug}</script><!-- Docsify v4 --><scriptsrc="resources/js/docsify.js"></script><scriptsrc="resources/js/prism-bash.min.js"></script><scriptsrc="resources/js/prism-cpp.min.js"></script><scriptsrc="resources/js/docsify-pagination.min.js"></script><scriptsrc="resources/js/docsify-footer.min.js"></script><scriptsrc="resources/js/vanilla-back-to-top.min.js"></script><scriptsrc="resources/js/docsify-plugin-title.min.js"></script><scriptsrc="resources/js/docsify-ads.min.js"></script><scriptsrc="resources/js/docsify-baidu-tj.min.js"></script><script>addBackToTop({diameter: 56,backgroundColor: 'rgb(66, 185, 131)',textColor: '#fff',});</script><script>if(typeofnavigator.serviceWorker!=='undefined'){navigator.serviceWorker.register('pwa.js')}</script></body>

root guide.md:

*[程序员英语学习指南](/A-Programmers-Guide-to-English/README.md)

Directory structure:

docs/A-Programmers-Guide-to-English
├─assets
├─essence
├─make-a-program
├─qa
├─resources
└─training

When I switch between different sections from the left side, the URL shows an incorrect path.

Current behaviour:

http://localhost:3000/#/A-Programmers-Guide-to-English/essence/make-a-program/README

Expected behaviour:

http://localhost:3000/#/A-Programmers-Guide-to-English/make-a-program/README

Originally posted by @L-Super in #1891 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions