fixed devlog routes being undiscoverable and 404ing on refresh; switched back to node adapter
This commit is contained in:
@@ -1,2 +1,2 @@
|
|||||||
export const prerender = true;
|
// export const prerender = true;
|
||||||
export const trailingSlash = 'always';
|
export const trailingSlash = 'always';
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
import Gallery, { type GalleryEntry } from "$lib/lists/gallery.svelte";
|
import Gallery, { type GalleryEntry } from "$lib/lists/gallery.svelte";
|
||||||
|
|
||||||
let allEntries: GalleryEntry[] = posts.entries().map(mapEntries).toArray()
|
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;
|
let loadEntryButton: HTMLElement;
|
||||||
|
|
||||||
function mapEntries(m: [String, DevlogPost], index: number): GalleryEntry {
|
function mapEntries(m: [String, DevlogPost], index: number): GalleryEntry {
|
||||||
@@ -19,10 +19,10 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadAllEntries() {
|
// function loadAllEntries() {
|
||||||
entries = allEntries;
|
// entries = allEntries;
|
||||||
loadEntryButton.style.display = "none";
|
// loadEntryButton.style.display = "none";
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Leftpads a single-digit number to two digits
|
// Leftpads a single-digit number to two digits
|
||||||
function leftpad(n: number): String {
|
function leftpad(n: number): String {
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
<p>Development log entries in reverse chronological order (newest to oldest).</p>
|
<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>
|
</Content>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import adapter from '@sveltejs/adapter-static';
|
import adapter from '@sveltejs/adapter-node';
|
||||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
||||||
import { mdsvex } from 'mdsvex';
|
import { mdsvex } from 'mdsvex';
|
||||||
import * as child_process from 'node:child_process';
|
import * as child_process from 'node:child_process';
|
||||||
|
|||||||
Reference in New Issue
Block a user