-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed as duplicate
Description
Hi, I am using Cloudflare Pages to automatically build and host mdBook.
However, the class="active" in the sidebar was lost.
This may be related to how the website server handles URLs.
On my website 1, URLs ending with .html are by default redirected with 307/3082.
Not sure how to handle this properly here.
Related code:
// crates/mdbook-html/front-end/templates/toc.js.hbs
connectedCallback() {
this.innerHTML = '{{#toc}}{{/toc}}';
// Set the current, active page, and reveal it if it's hidden
let current_page = document.location.href.toString().split('#')[0].split('?')[0];
if (current_page.endsWith('/')) {
current_page += 'index.html';
}Footnotes
Metadata
Metadata
Assignees
Labels
No labels