diff --git a/src/components/sections/FooterSection.astro b/src/components/sections/FooterSection.astro index a91dcd0..fddaf56 100644 --- a/src/components/sections/FooterSection.astro +++ b/src/components/sections/FooterSection.astro @@ -5,6 +5,7 @@ import EmailFooterInput from "../ui/forms/input/EmailFooterInput.astro"; import enStrings from "@/utils/navigation.ts"; import frStrings from "@/utils/fr/navigation.ts"; import Icon from "../ui/icons/Icon.astro"; +import { SITE } from "@/data_files/constants"; // Select the correct translation based on the page's lang prop: const strings = Astro.currentLocale === "fr" ? frStrings : enStrings; @@ -124,7 +125,7 @@ const crafted: string = Astro.currentLocale === "fr" ? "Fabriqué par" : "Crafte >

- © ScrewFast. {crafted} + © {SITE.title}. {crafted} + title={pageTitle} +>

diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro index 0fff043..42fbd3b 100644 --- a/src/pages/blog/[...slug].astro +++ b/src/pages/blog/[...slug].astro @@ -10,6 +10,7 @@ import { Image } from "astro:assets"; import { capitalize, formatDate } from "@/utils/utils"; import { getCollection } from "astro:content"; import type { CollectionEntry } from "astro:content"; +import { SITE } from "@/data_files/constants"; // getStaticPaths is used to pre-render all routes based on the blog posts export async function getStaticPaths() { @@ -32,9 +33,14 @@ const blogPosts: CollectionEntry<"blog">[] = await getCollection("blog"); const relatedPosts: CollectionEntry<"blog">[] = blogPosts.filter( (blogEntry) => blogEntry.slug !== post.slug ); + +const pageTitle: string = `${post.data.title} | ${SITE.title}`; + --- - +
diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro index ae058c6..6e1b501 100644 --- a/src/pages/blog/index.astro +++ b/src/pages/blog/index.astro @@ -6,6 +6,7 @@ import CardBlogRecent from "@/components/ui/cards/CardBlogRecent.astro"; import CardInsight from "@/components/ui/cards/CardInsight.astro"; import { getCollection } from "astro:content"; import type { CollectionEntry } from "astro:content"; +import { SITE } from "@/data_files/constants"; // Get all blogs post and sort them based on publish date const blogPosts: CollectionEntry<"blog">[] = (await getCollection("blog")).sort( @@ -15,7 +16,7 @@ const blogPosts: CollectionEntry<"blog">[] = (await getCollection("blog")).sort( // Get all insights posts const insightPosts: CollectionEntry<"insights">[] = await getCollection("insights"); - + // Separate the most recent post from others const mostRecentPost: CollectionEntry<"blog"> = blogPosts[0]; const otherPosts: CollectionEntry<"blog">[] = blogPosts.slice(1); @@ -27,10 +28,12 @@ const subTitle: string = const secondTitle: string = "Insights"; const secondSubTitle: string = "Stay up-to-date with the latest trends and developments in the construction industry with insights from ScrewFast's team of industry experts. "; + +const pageTitle: string = `Blog | ${SITE.title}`; --- - +
diff --git a/src/pages/products/[...slug].astro b/src/pages/products/[...slug].astro index 3e68918..d423383 100644 --- a/src/pages/products/[...slug].astro +++ b/src/pages/products/[...slug].astro @@ -5,6 +5,7 @@ import ProductTabBtn from "@/components/ui/buttons/ProductTabBtn.astro"; import PrimaryCTA from "@/components/ui/buttons/PrimaryCTA.astro"; import { Image } from "astro:assets"; import { getCollection } from "astro:content"; +import { SITE } from "@/data_files/constants"; // Global declaration for gsap animation library declare global { @@ -22,9 +23,13 @@ export async function getStaticPaths() { } const { product } = Astro.props; + +const pageTitle: string = `${product.data.main.title} | ${SITE.title}`; --- - +
diff --git a/src/pages/products/index.astro b/src/pages/products/index.astro index cb103be..0403ed9 100644 --- a/src/pages/products/index.astro +++ b/src/pages/products/index.astro @@ -10,6 +10,7 @@ import TestimonialsSectionAlt from "@/components/sections/testimonials/Testimoni // Importing necessary functions from Astro import { getCollection } from "astro:content"; import type { CollectionEntry } from "astro:content"; +import { SITE } from "@/data_files/constants"; // Fetching all the product related content and sorting it by main.id const product: CollectionEntry<"products">[] = ( @@ -57,10 +58,12 @@ const testimonials = [ avatarAlt: "Image Description", }, ]; + +const pageTitle: string = `Products | ${SITE.title}`; --- -