site: use trailing slash for urls
This commit is contained in:
committed by
Johannes Kirschbauer
parent
d92623f07e
commit
25db58ce11
2
site/src/routes/+layout.ts
Normal file
2
site/src/routes/+layout.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export const prerender = true;
|
||||
export const trailingSlash = "always";
|
||||
@@ -9,7 +9,7 @@ const articles = import.meta.glob<{
|
||||
}>("../**/*.md");
|
||||
|
||||
export async function load({ params }) {
|
||||
const article = articles[`../${params.path}.md`];
|
||||
const article = articles[`../${params.path.slice(0, -"/".length)}.md`];
|
||||
if (!article) {
|
||||
error(404, "");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user