Add basic tag support for showing and filtering tagged posts

This commit is contained in:
2026-01-12 13:49:23 -08:00
parent b0fd1b6d9e
commit 88b6d1bade
7 changed files with 109 additions and 163 deletions

View File

@@ -58,9 +58,9 @@ async function blogPosts(hmr: boolean) {
return new Response(
renderToString(
<AppShell>
<Post
meta={data}
children={post.content}
<Post
meta={data}
children={post.content}
/>
</AppShell>,
),
@@ -96,8 +96,7 @@ Bun.serve({
// Home page
"/": (req: Request) => {
// Extract URL parameters from the request to pass to the component
const url = new URL(req.url);
const searchParams = Object.fromEntries(url.searchParams.entries());
const searchParams = new URLSearchParams(req.url.split('?')[1]);
if (req.headers.get("shell-loaded") === "true") {
return new Response(renderToString(<Home searchParams={searchParams} />), {