diff --git a/crates/mdbook-core/src/config.rs b/crates/mdbook-core/src/config.rs index b2c6862c30..85e3f0fc9a 100644 --- a/crates/mdbook-core/src/config.rs +++ b/crates/mdbook-core/src/config.rs @@ -518,6 +518,9 @@ pub struct HtmlConfig { /// If enabled, the sidebar includes navigation for headers on the current /// page. Default is `true`. pub sidebar_header_nav: bool, + /// If enabled, HTML files will not have the `.html` extension in URLs. + /// Defaults to `false`. + pub no_html_extension: bool, } impl Default for HtmlConfig { @@ -548,6 +551,7 @@ impl Default for HtmlConfig { redirect: HashMap::new(), hash_files: true, sidebar_header_nav: true, + no_html_extension: false, } } } diff --git a/crates/mdbook-html/front-end/templates/index.hbs b/crates/mdbook-html/front-end/templates/index.hbs index b1834189f9..cbc8848864 100644 --- a/crates/mdbook-html/front-end/templates/index.hbs +++ b/crates/mdbook-html/front-end/templates/index.hbs @@ -129,7 +129,7 @@