From f7a602b8f8e3f7c9ad9c1ab9e92a1f1a121f4d00 Mon Sep 17 00:00:00 2001 From: Daveed Date: Fri, 21 Feb 2025 17:16:23 -0500 Subject: [PATCH 1/4] opening link in new tab if diff domain --- src/layouts/PostDetails.astro | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/layouts/PostDetails.astro b/src/layouts/PostDetails.astro index 2ffa53f..6f65975 100644 --- a/src/layouts/PostDetails.astro +++ b/src/layouts/PostDetails.astro @@ -59,6 +59,18 @@ const layoutProps = { }; --- + +
From e002340304ab1a7c94796de4a1c9f15a91fed2e5 Mon Sep 17 00:00:00 2001 From: Daveed Date: Fri, 21 Feb 2025 17:21:15 -0500 Subject: [PATCH 2/4] displaying a default blog title in blog page --- src/layouts/Posts.astro | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/layouts/Posts.astro b/src/layouts/Posts.astro index a2b0297..01ef53b 100644 --- a/src/layouts/Posts.astro +++ b/src/layouts/Posts.astro @@ -59,11 +59,17 @@ const blogPage: { data: Page } | undefined = pages.find( ) }

- {blogPage?.data?.Title} + {blogPage?.data?.Title || "Blog Posts"}

- + { + blogPage?.data?.Content ? ( + + ) : ( + "Articles by our contributors" + ) + }
From 7d3a55480ac977b20d7ac1f20c30b9746832f993 Mon Sep 17 00:00:00 2001 From: Daveed Date: Fri, 21 Feb 2025 17:34:03 -0500 Subject: [PATCH 3/4] Displaying tags page content if we have it --- src/pages/tags/index.astro | 52 +++++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/src/pages/tags/index.astro b/src/pages/tags/index.astro index 8b8f694..175a027 100644 --- a/src/pages/tags/index.astro +++ b/src/pages/tags/index.astro @@ -9,6 +9,11 @@ import { SITE } from "@config"; import { getCollection } from "astro:content"; import type Store from "@interfaces/Store"; import { markketplace } from "@config"; +import HeroImage from "@components/HeroImage.astro"; +import { + BlocksRenderer, + type BlocksContent, +} from "@strapi/blocks-react-renderer"; const stores = await getCollection("stores"); const store: { data: Store } | undefined = stores?.find( @@ -19,16 +24,55 @@ const posts = await getCollection("posts"); let tags = getUniqueTags(posts); -// { id: 3, Label: 'Company', Color: 'Magenta' } ] } -// from posts.Tags +const pages = await getCollection("pages"); +const TagsPage = pages.find( + (page: { data: { title: string } }) => page.data.slug === "tags" +); + +const pageTitle = TagsPage?.data.Title || "Tags"; +const pageDesc = + TagsPage?.data?.SEO?.metaDescription || "All the tags used in posts."; --- - +
-
+
+
+ { + TagsPage?.data?.SEO?.socialImage && ( + + ) + } +
    {tags.map(({ tag }) => tag && )}
+
+

+ {tags.length} tags found. +

+
+
+ { + TagsPage?.data?.Content ? ( + + ) : ( + "Articles by our contributors" + ) + } +