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

Mkdocs: Links without trailing / can break sidebar navigation #161

Open
strugee opened this issue Sep 18, 2023 · 7 comments
Open

Mkdocs: Links without trailing / can break sidebar navigation #161

strugee opened this issue Sep 18, 2023 · 7 comments
Assignees
Labels
bug Something isn't working help wanted Good for new / external contributors

Comments

@strugee
Copy link
Sponsor Contributor

strugee commented Sep 18, 2023

STR:

  1. Visit https://github.com/photoprism/photoprism/blob/e7370838221c373a23dc9a09f186a6065e2a5162/CONTRIBUTING.md#submitting-pull-requests
  2. Click the "step-by-step guide" link, which goes to https://docs.photoprism.app/developer-guide/pull-requests
  3. Click AFAICT basically anything in the sidebar (I clicked "Build setup")
  4. 404 Not Found

Adding a / to the URL - e.g. https://docs.photoprism.app/developer-guide/pull-requests/ - makes the sidebar function as intended.

@lastzero
Copy link
Member

lastzero commented Sep 18, 2023

Maybe that's something that must be fixed in mkdocs material then?

Edit: I've asked for advice in their private support chat. Maybe this can be solved with a config option. The site is hosed on a CDN, so we don't directly control the web server config.

@lastzero lastzero changed the title No trailing / in URL breaks sidebar navigation Mkdocs: Links without trailing / can break sidebar navigation Sep 18, 2023
@lastzero lastzero added bug Something isn't working in-progress Somebody is working on this labels Sep 18, 2023
@lastzero
Copy link
Member

It seems that this needs to be fixed on the server side or in the CDN config. So I'll have to postpone finding a solution until I have time for doing this.

@lastzero lastzero self-assigned this Sep 18, 2023
@strugee
Copy link
Sponsor Contributor Author

strugee commented Sep 18, 2023

Another option is to do it the quick and dirty way and add a bit of JavaScript to fix up the URL. Doing it server side is better though since that obviously won't work for anyone with JavaScript disabled.

@lastzero
Copy link
Member

lastzero commented May 9, 2024

I've tested this again and the problem seems to be fixed with the latest version of MkDocs Material, which we use to render our docs from Markdown files. Shall we close this issue then?

@lastzero lastzero added please-test Ready for acceptance test and removed in-progress Somebody is working on this labels May 9, 2024
@strugee
Copy link
Sponsor Contributor Author

strugee commented May 9, 2024

Hmm. I can still reproduce using the STR from the description?

@lastzero
Copy link
Member

lastzero commented May 9, 2024

You're right, my bad. Didn't properly follow the steps!

@lastzero lastzero added help wanted Good for new / external contributors and removed please-test Ready for acceptance test labels May 9, 2024
@strugee
Copy link
Sponsor Contributor Author

strugee commented May 9, 2024

No problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Good for new / external contributors
Projects
Status: Development 🐝
Development

No branches or pull requests

2 participants