Skip to content

When served locally, sometimes chapters load without the .html extension, causing 404 #2764

@croian

Description

@croian

Problem

Here is my SUMMARY.md file:

# Summary

[How to use these docs](introduction.md)

# User guide

- [Getting started](getting_started.md)
- [Using Mouseless](using_mouseless.md)
- [Customizing Mouseless](customizing_mouseless.md)
- [Keybindings / command reference](keybindings.md)
- [Troubleshooting](troubleshooting.md)

# Other

- [Roadmap and Known Issues](roadmap_and_issues.md)

I triple check that the filename getting_started.md is correct, but when I run mdbook serve --open, and click the 'Getting started' link there is no .html at the end of the url in the address bar (though it appears in the preview text when I hover on the link, see screenshot), and I get a 404 page. Other pages work fine.

I've disabled [additional-js] in my .toml file, rebuilt and restarted, and still have the issue.

If I change the filename and ref (in SUMMARY.md) to a.md or a_started.md, then it works as expected.

Also, it appears to work fine once I actually deploy the files to production / live environment: https://mouseless.click/docs/

Image

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version

mdbook --version
mdbook v0.4.52

(also seen on v0.4.49, before I updated)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: A bug, incorrect or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions