Skip to content

feat: URLs with no index.html suffix #3047

Open
jhult wants to merge 12 commits intorust-lang:masterfrom
jhult:feat/no-html-ext
Open

feat: URLs with no index.html suffix #3047
jhult wants to merge 12 commits intorust-lang:masterfrom
jhult:feat/no-html-ext

Conversation

@jhult
Copy link
Contributor

@jhult jhult commented Mar 8, 2026

Fixes #1251

[output.html]
no-html-extension=true
**no-html-extension:** When set to `true`, generates clean URLs without `.html` extensions. All pages are written to directory-based paths (e.g., `chapter/index.html` instead of `chapter.html`).

Special pages are placed in `_print/`, `_toc/`, and `_404/` directories.

All internal links use trailing-slash format (`chapter/` instead of `chapter.html`).

Works with all major static hosting providers (GitHub Pages, Netlify, Cloudflare Pages) and the built-in `mdbook serve` command.

**Note:** Chapter paths starting with `_print`, `_toc`, or `_404` will cause a build error.

Defaults to `false`.

Vaguely related PRs: #2570, #2993, #3028, #3034, #3038

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Mar 8, 2026
@bens-schreiber
Copy link

Certainly fixes my issue #3028 . Would love to get this in.

@jhult
Copy link
Contributor Author

jhult commented Mar 9, 2026

@ehuss or @Dylan-DPC, I think many people would appreciate this being merged. I'd love any feedback you have to share.

@jhult jhult force-pushed the feat/no-html-ext branch from 3052bb5 to b2230d7 Compare March 16, 2026 19:43
@rustbot
Copy link
Collaborator

rustbot commented Mar 16, 2026

This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: waiting on a review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove index.html suffix

3 participants