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

[BUG] relative links on the index page don't always work #1625

Closed
MattSturgeon opened this issue Jun 3, 2024 · 2 comments · Fixed by #2442
Closed

[BUG] relative links on the index page don't always work #1625

MattSturgeon opened this issue Jun 3, 2024 · 2 comments · Fixed by #2442
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@MattSturgeon
Copy link
Member

Description

When accessing the docs' index directly (as /user-guide/install.html), relative links no longer work correctly (i.e. the links to Home Manager Usage and Standalone Usage).

Minimal, Reproducible Example (MRE)

  1. Visit https://nix-community.github.io/nixvim
  2. Click a relative link
  3. Everything works
  4. Open (ToC sidebar)
  5. Click "Installation"
  6. Repeat step 2 (click relative link)
  7. This time the link is broken (points to e.g. /user-guide/modules/hm.html, note the extra /user-guide prefix)
@MattSturgeon MattSturgeon added bug Something isn't working documentation Improvements or additions to documentation labels Jun 3, 2024
@MattSturgeon
Copy link
Member Author

I guess we could work around this issue by having a separate index page that isn't install.html?

@MattSturgeon
Copy link
Member Author

We may be able to leverage mdbook's special handling of README files?

Links to README.md will be converted to index.html. This is done since some services like GitHub render README files automatically, but web servers typically expect the root file to be called index.html.
https://rust-lang.github.io/mdBook/format/markdown.html#links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants