Add basic tag support for showing and filtering tagged posts
This commit is contained in:
@@ -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} />), {
|
||||
|
||||
Reference in New Issue
Block a user