fixed devlog routes being undiscoverable and 404ing on refresh; switched back to node adapter

This commit is contained in:
2026-01-31 10:57:57 +01:00
parent d08be37bd0
commit 466d8bee1a
3 changed files with 9 additions and 9 deletions

View File

@@ -1,2 +1,2 @@
export const prerender = true;
// export const prerender = true;
export const trailingSlash = 'always';

View File

@@ -6,7 +6,7 @@
import Gallery, { type GalleryEntry } from "$lib/lists/gallery.svelte";
let allEntries: GalleryEntry[] = posts.entries().map(mapEntries).toArray()
let entries: GalleryEntry[] = $state(allEntries.slice(0, 3));
// let entries: GalleryEntry[] = allEntries;//$state(allEntries.slice(0, 3));
let loadEntryButton: HTMLElement;
function mapEntries(m: [String, DevlogPost], index: number): GalleryEntry {
@@ -19,10 +19,10 @@
};
}
function loadAllEntries() {
entries = allEntries;
loadEntryButton.style.display = "none";
}
// function loadAllEntries() {
// entries = allEntries;
// loadEntryButton.style.display = "none";
// }
// Leftpads a single-digit number to two digits
function leftpad(n: number): String {
@@ -50,7 +50,7 @@
<p>Development log entries in reverse chronological order (newest to oldest).</p>
<Gallery entries={entries} reverseTextOrder />
<Gallery entries={allEntries} reverseTextOrder />
<button class="button-fullwidth" onclick={loadAllEntries} bind:this={loadEntryButton}>Load all entries</button>
<!-- <button class="button-fullwidth" onclick={loadAllEntries} bind:this={loadEntryButton}>Load all entries</button> -->
</Content>

View File

@@ -1,4 +1,4 @@
import adapter from '@sveltejs/adapter-static';
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { mdsvex } from 'mdsvex';
import * as child_process from 'node:child_process';