Skip to content
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

_sidebar.md gets 404 for any file not in the root of the distFolder #52

Closed
GregEisenberg opened this issue Feb 17, 2022 · 4 comments
Closed

Comments

@GregEisenberg
Copy link

GregEisenberg commented Feb 17, 2022

Root issue: _sidebar.md gets 404 for any file not in the root of the distFolder

Context:
We are following the source layout example provided in the readme and using the sidebar=true option. After building, the distFolder has a file called _sidebar.md. The top level index.html and Home.md file renders perfectly and work correctly. However for every page in any subfolders of the distFolder, they fail to find _sidebar.md because those subfolder do not have that file. Looking at the web debugger is that it seems to make requests for _sidebar.md once per level in the tree.. but no request from a page below the root of distFolder makes the request for the topmost.

Its possible that what I am hitting is really docsifyjs/docsify#1713 but wanted to call it out here too.

@GregEisenberg
Copy link
Author

Per comments provided to me in here adding

      "alias": {
        '/.*/_sidebar.md': '/_sidebar.md'
      },

in index.html's window.$docsify object did fix the issue. Looking to see if i can find where that index.html is generated and will see if I can provide a PR, otherwise it seems the solution is clear just need to figure out how to implement it.

@MickeJohannesson
Copy link

It's located in the docsify.template.js file.
The injection of the options are made in build.js (look for docsify homepage)
I have added this one fix also into my PR #56

@adrianvlupu
Copy link
Owner

It should be fixed now (hopefully)

@GregEisenberg
Copy link
Author

GregEisenberg commented Apr 12, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants