rust-lang / mdBook

Create book from markdown files. Like Gitbook but implemented in Rust
https://rust-lang.github.io/mdBook/
Mozilla Public License 2.0
18.4k stars 1.65k forks source link

Problems serving mdbook #2477

Closed Tealk closed 1 week ago

Tealk commented 1 week ago

Problem

When I use mdbook serve, I get the following errors. The first time I click on a navigation link, I get to the correct page. http://localhost:3000/material/waffen/index.html The second time I click, it duplicates the path http://localhost:3000/material/waffen/material/waffen/index.html The third time, it is correct again, and so on.

Furthermore, since the last update, the menu items no longer work when expanded.

Here is an online version of the problem. https://bak.butterfly-aspect.de/

Steps

No response

Possible Solution(s)

No response

Notes

Tested with Firefox and Brave. Book: https://codeberg.org/Moirenico/mdBook/src/branch/develop

Version

mdbook v0.4.42
Tealk commented 1 week ago

Everything still works with the 0.4.40 used here https://dev.moireni.co/ https://ci.codeberg.org/repos/12296/pipeline/206/config

ehuss commented 1 week ago

I think you'll likely need to update the index.hbs file in the theme. It has some controls for navigation, and they changed in the latest version.

Tealk commented 1 week ago

Yes well I should have realized, sorry for the circumstances.

ehuss commented 1 week ago

No worries. It would be nice to figure out a better way to handle updating it. I'm not sure what that would look like, but perhaps it could at least warn you about it. I should also probably make it more prominent in the release notes.

Tealk commented 1 week ago

I could also have seen in the commits that the index.hbs was changed, I just hadn't thought about it because it is so rarely changed 😓 But a "template has been adjusted" in the changelog would also be a good hint I think.