fix: auto-redirect remove

This commit is contained in:
2026-01-10 05:32:25 +02:00
parent 87cde7ae5c
commit 948fbfe079
2 changed files with 3 additions and 15 deletions

16
404.qmd
View File

@@ -3,22 +3,8 @@ title: "Page Not Found"
page-layout: full page-layout: full
--- ---
<script>
// Redirect trailing slash URLs to .html for GitHub Pages compatibility
(function() {
var path = window.location.pathname;
// If URL ends with trailing slash and it's not the homepage
if (path.endsWith('/') && path !== '/') {
// Remove trailing slash and add .html
var newPath = path.slice(0, -1) + '.html';
window.location.replace(newPath);
}
})();
</script>
## Page Not Found ## Page Not Found
The page you're looking for doesn't exist. You'll be redirected shortly if this was caused by a trailing slash in the URL. The page you're looking for doesn't exist.
[Return to homepage](/) [Return to homepage](/)

View File

@@ -55,6 +55,8 @@ format:
css: styles.css css: styles.css
toc: false toc: false
page-layout: article page-layout: article
## link-external-newwindow: true
## link-external-icon: false
include-in-header: include-in-header:
- _includes/analytics.html - _includes/analytics.html
- _includes/fonts.html - _includes/fonts.html