mirror of
https://github.com/olehomelchenko/olehomelchenko.com.git
synced 2026-02-05 02:54:37 +00:00
chore: fix trailing slash problem
This commit is contained in:
24
404.qmd
Normal file
24
404.qmd
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
title: "Page Not Found"
|
||||||
|
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
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
[Return to homepage](/)
|
||||||
12
_quarto.yml
12
_quarto.yml
@@ -1,6 +1,8 @@
|
|||||||
project:
|
project:
|
||||||
type: website
|
type: website
|
||||||
output-dir: _site
|
output-dir: _site
|
||||||
|
resources:
|
||||||
|
- .nojekyll
|
||||||
render:
|
render:
|
||||||
- "*.qmd"
|
- "*.qmd"
|
||||||
- "!archetypes/"
|
- "!archetypes/"
|
||||||
@@ -26,15 +28,15 @@ website:
|
|||||||
background: light
|
background: light
|
||||||
left:
|
left:
|
||||||
- text: "Posts"
|
- text: "Posts"
|
||||||
href: posts/index.qmd
|
href: posts
|
||||||
- text: "TILs"
|
- text: "TILs"
|
||||||
href: til/index.qmd
|
href: til
|
||||||
- text: "Portfolio"
|
- text: "Portfolio"
|
||||||
href: portfolio/index.qmd
|
href: portfolio
|
||||||
- text: "Projects"
|
- text: "Projects"
|
||||||
href: projects/index.qmd
|
href: projects
|
||||||
- text: "About"
|
- text: "About"
|
||||||
href: about/index.qmd
|
href: about
|
||||||
right:
|
right:
|
||||||
- icon: github
|
- icon: github
|
||||||
href: https://github.com/olehomelchenko
|
href: https://github.com/olehomelchenko
|
||||||
|
|||||||
Reference in New Issue
Block a user