[GH-ISSUE #161] Mkdocs: Links without trailing / can break sidebar navigation #33

Closed
opened 2026-03-02 16:47:10 +03:00 by kerem · 9 comments
Owner

Originally created by @strugee on GitHub (Sep 18, 2023).
Original GitHub issue: https://github.com/photoprism/photoprism-docs/issues/161

Originally assigned to: @lastzero on GitHub.

STR:

  1. Visit github.com/photoprism/photoprism@e737083822/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.

Originally created by @strugee on GitHub (Sep 18, 2023). Original GitHub issue: https://github.com/photoprism/photoprism-docs/issues/161 Originally assigned to: @lastzero on GitHub. 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.
kerem 2026-03-02 16:47:10 +03:00
  • closed this issue
  • added the
    bug
    done
    labels
Author
Owner

@lastzero commented on GitHub (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.

<!-- gh-comment-id:1722992021 --> @lastzero commented on GitHub (Sep 18, 2023): Maybe that's something that must be fixed in [mkdocs material](https://squidfunk.github.io/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.
Author
Owner

@lastzero commented on GitHub (Sep 18, 2023):

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.

<!-- gh-comment-id:1723365285 --> @lastzero commented on GitHub (Sep 18, 2023): 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.
Author
Owner

@strugee commented on GitHub (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.

<!-- gh-comment-id:1723903774 --> @strugee commented on GitHub (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.
Author
Owner

@lastzero commented on GitHub (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?

<!-- gh-comment-id:2102276463 --> @lastzero commented on GitHub (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?
Author
Owner

@strugee commented on GitHub (May 9, 2024):

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

<!-- gh-comment-id:2102834096 --> @strugee commented on GitHub (May 9, 2024): Hmm. I can still reproduce using the STR from the description?
Author
Owner

@lastzero commented on GitHub (May 9, 2024):

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

<!-- gh-comment-id:2102840093 --> @lastzero commented on GitHub (May 9, 2024): You're right, my bad. Didn't properly follow the steps!
Author
Owner

@strugee commented on GitHub (May 9, 2024):

No problem!

<!-- gh-comment-id:2102846930 --> @strugee commented on GitHub (May 9, 2024): No problem!
Author
Owner

@graciousgrey commented on GitHub (Jan 24, 2025):

This seems to work now. I tested with the exact steps mentioned above and the missing slash has been added automatically.

<!-- gh-comment-id:2612685180 --> @graciousgrey commented on GitHub (Jan 24, 2025): This seems to work now. I tested with the exact steps mentioned above and the missing slash has been added automatically.
Author
Owner

@lastzero commented on GitHub (Jan 24, 2025):

Since we moved our docs from DigitalOcean to our own server and CDN, this issue seems to be resolved. Feel free to test again!

<!-- gh-comment-id:2613038628 --> @lastzero commented on GitHub (Jan 24, 2025): Since we moved our docs from DigitalOcean to our own server and CDN, this issue seems to be resolved. Feel free to test again!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/photoprism-docs#33
No description provided.