moved blog over to BlogPostLink data type to fix error 500 on page refresh
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<script lang="ts">
|
||||
import Banner2 from "$lib/banner2.svelte";
|
||||
import Content from "$lib/viewport/content.svelte";
|
||||
import { posts, type DevlogPost, type DevlogPostLink } from "./devlog/posts";
|
||||
import { posts, type DevlogPostLink } from "./devlog/posts";
|
||||
import Gallery, { type GalleryEntry } from "$lib/lists/gallery.svelte";
|
||||
|
||||
let entries = posts.map(mapEntries);
|
||||
let entries: GalleryEntry[] = posts.map(mapEntries);
|
||||
|
||||
function mapEntries(entry: DevlogPostLink, index: number): GalleryEntry {
|
||||
return {
|
||||
|
||||
@@ -4,7 +4,6 @@ export async function load({ params }) {
|
||||
const post = await import(`../../${params.year}/${params.date}.md`);
|
||||
|
||||
const tag: string = `${params.year}/${params.date}`;
|
||||
// const postValues = posts.get(tag);
|
||||
const postValues = posts.find((v: DevlogPostLink) => v.key == tag)?.post;
|
||||
const content = post.default;
|
||||
const title: string = postValues?.title ?? "";
|
||||
|
||||
Reference in New Issue
Block a user