diff --git a/web/src/pages/posts/tag/[tag].astro b/web/src/pages/posts/tag/[tag].astro index 874f123..f09cbcd 100644 --- a/web/src/pages/posts/tag/[tag].astro +++ b/web/src/pages/posts/tag/[tag].astro @@ -1,4 +1,33 @@ --- +import Base from "@layout/Base" +import PostCard from '@components/postList/postCard' +import { authPB } from "@utils/pocketbase" +export const prerender = false + +const { tag } = Astro.params +const pb = await authPB() + +const posts = await pb.collection('posts').getFullList({ + sort: '-publishDate', + filter: `tags ~ "${tag}" && published=true` +}) + +const postCount = posts.length +const plural = postCount === 1 ? "post" : "posts" +--- -export const prerender = false ---- \ No newline at end of file + + +
+ Back + +

{postCount} {plural} with tag {tag}

+
+ +
+ { + posts.map(p => ) + } +
+ + \ No newline at end of file