tags are now displayed in banner; adjusted sizing of elements in banner
This commit is contained in:
@@ -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,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user