Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
maehr committed Sep 6, 2023
1 parent db232ab commit c379778
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/credits/+page.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async function getCredits() {
}

/** @type {import('./$types').PageLoad} */
export async function load(event) {
export async function load() {
const credits = await getCredits();
return {
...credits
Expand Down
3 changes: 3 additions & 0 deletions src/routes/index/[...path]/+page.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { error } from '@sveltejs/kit';

/** @type {import('./$types').PageLoad}*/
export async function load({ params }) {
if (params.path === '') {
return { url: 'index.html' };
}
if (data.urls.includes(params.path)) {
return { url: params.path };
} else {
Expand Down
2 changes: 2 additions & 0 deletions src/routes/index/[...path]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import Container from '$lib/components/Container.svelte';
/** @type {import('./$types').PageData} */
export let data;
// append .html if not present
if (!data.url.endsWith('.html')) data.url += '.html';
</script>

<!-- SEO -->
Expand Down

0 comments on commit c379778

Please sign in to comment.