tags are now displayed in banner; adjusted sizing of elements in banner

This commit is contained in:
2026-04-02 16:15:02 +02:00
parent f932793b62
commit 83c6732b3a
4 changed files with 34 additions and 11 deletions

View File

@@ -1,26 +1,30 @@
import { posts, type BlogPostLink } from '../../posts';
import { BlogPostTag, posts, type BlogPostLink } from '../../posts';
export async function load({ params }) {
const post = await import(`../../${params.year}/${params.date}.md`);
const tag: string = `${params.year}/${params.date}`;
const tag: string = `${params.year}/${params.date}`; // link to the page. not to be confused with tags. i know it's confusing naming
const postValues = posts.find((v: BlogPostLink) => v.key == tag)?.post;
const content = post.default;
const title: string = postValues?.title ?? "";
const subtitle: string = postValues?.subtitle ?? "";
const date: string = postValues?.date ?? "";
const dateUpdated: string = postValues?.dateUpdated ?? "";
const time: string = postValues?.time ?? "";
const banner: string = postValues?.banner ?? "";
const description: string = postValues?.description ?? "";
const tags: BlogPostTag[] = postValues?.tags ?? []; // blog post tags. should be renamed 'keywords'
return {
content,
title,
subtitle,
banner,
date,
dateUpdated,
time,
tag,
tags,
description,
};
}