diff --git a/public/og/default.jpg b/public/og/default.jpg
new file mode 100644
index 0000000..9a8bed0
Binary files /dev/null and b/public/og/default.jpg differ
diff --git a/src/config/site.ts b/src/config/site.ts
new file mode 100644
index 0000000..eada9ae
--- /dev/null
+++ b/src/config/site.ts
@@ -0,0 +1,10 @@
+export const SITE_NAME = "Highland Group RDA";
+
+const siteUrlFromEnv =
+ import.meta.env.SITE ?? "https://highlandgrouprda.org.uk";
+
+export const SITE_URL = siteUrlFromEnv;
+export const DEFAULT_OG_IMAGE = "/og/default.jpg";
+export const TWITTER_SITE = "@HighlandGroupRDA";
+export const TWITTER_CARD = "summary_large_image";
+export const OG_TYPE = "website";
diff --git a/src/layouts/Base.astro b/src/layouts/Base.astro
index 0554239..4e0bf95 100644
--- a/src/layouts/Base.astro
+++ b/src/layouts/Base.astro
@@ -1,91 +1,18 @@
---
-import "../styles/global.css";
+import BaseLayout from "./BaseLayout.astro";
-const {
- title = "Home",
- description = "Highland Group RDA provides horse riding for people with disabilities in the Highlands, offering safe, fun, and therapeutic equestrian activities.",
- keywords = "Highland Group RDA, horse riding for disabilities, therapeutic riding Highlands, RDA Scotland, equestrian therapy, disability riding lessons",
- path = "/",
- image = "/Samantha-and-Connolly-1280.webp",
-} = Astro.props;
-
-const SITE_NAME = "Highland Group RDA";
-const BASE_URL = "https://highlandgrouprda.org.uk";
-const pageTitle = `${SITE_NAME} - ${title}`;
-const canonical = path === "/" ? BASE_URL : `${BASE_URL}${path}`;
-const imageUrl = image.startsWith("http") ? image : `${BASE_URL}${image}`;
+const { title, description, keywords, path, image } = Astro.props;
---
-
-
-
-
-
- {pageTitle}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
+
+
+
diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro
new file mode 100644
index 0000000..08d4024
--- /dev/null
+++ b/src/layouts/BaseLayout.astro
@@ -0,0 +1,104 @@
+---
+import "../styles/global.css";
+import {
+ DEFAULT_OG_IMAGE,
+ OG_TYPE,
+ SITE_NAME,
+ SITE_URL,
+ TWITTER_CARD,
+ TWITTER_SITE,
+} from "../config/site";
+
+const { title = "", description, keywords, canonicalPath, ogImage } =
+ Astro.props;
+
+const pageTitle =
+ title && title !== SITE_NAME ? `${title} | ${SITE_NAME}` : SITE_NAME;
+const canonicalUrl = new URL(
+ canonicalPath ?? Astro.url.pathname,
+ SITE_URL
+).toString();
+
+const ogImagePath = ogImage ?? DEFAULT_OG_IMAGE;
+const ogImageUrl = ogImagePath
+ ? new URL(ogImagePath, SITE_URL).toString()
+ : "";
+const hasOgImage = Boolean(ogImagePath);
+const twitterSite = TWITTER_SITE?.trim();
+---
+
+
+
+
+
+
+ {pageTitle}
+
+
+
+
+
+
+
+
+ {hasOgImage && }
+
+
+
+ {hasOgImage && }
+ {twitterSite && }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/404.astro b/src/pages/404.astro
index 9ff0282..198c81e 100644
--- a/src/pages/404.astro
+++ b/src/pages/404.astro
@@ -2,29 +2,43 @@
import Base from "../layouts/Base.astro";
---
-
-
-
-
-
-
-
-
404 Page Not Found
-
-
- The page you are looking for does not exist. Try heading back to the homepage.
-
-
Return home
+
+
+
+
+
+
+
+
+ 404 Page Not Found
+
+
+
+ The page you are looking for does not exist. Try heading back to
+ the homepage.
+
+
Return home
+
-
diff --git a/src/pages/about.astro b/src/pages/about.astro
index f32161d..3d34849 100644
--- a/src/pages/about.astro
+++ b/src/pages/about.astro
@@ -1,20 +1,20 @@
---
-import Base from "../layouts/Base.astro";
+import BaseLayout from "../layouts/BaseLayout.astro";
import SiteHeader from "../components/SiteHeader.astro";
import SiteFooter from "../components/SiteFooter.astro";
import { navigationItems } from "../lib/navigation";
const pageSeo = {
title: "About",
- path: "/about",
description:
"Highland Group RDA is a volunteer-led charity offering therapeutic horse riding in the Highlands. Learn about our mission, history, and community impact.",
keywords:
"Highland Group RDA, about Highland RDA, RDA charity, volunteer-led charity Scotland, therapeutic riding, equestrian therapy Highlands",
+ canonicalPath: "/about",
};
---
-
+
@@ -380,4 +380,4 @@ const pageSeo = {
-
+
diff --git a/src/pages/accessibility.astro b/src/pages/accessibility.astro
index b2582b8..8612261 100644
--- a/src/pages/accessibility.astro
+++ b/src/pages/accessibility.astro
@@ -1,20 +1,20 @@
---
-import Base from "../layouts/Base.astro";
+import BaseLayout from "../layouts/BaseLayout.astro";
import SiteHeader from "../components/SiteHeader.astro";
import SiteFooter from "../components/SiteFooter.astro";
import { navigationItems } from "../lib/navigation";
const pageSeo = {
title: "Accessibility",
- path: "/accessibility",
description:
"Read Highland Group RDA's Accessibility Statement and learn how we make our website inclusive and accessible for all users.",
keywords:
"Highland Group RDA accessibility, accessible charity website, web accessibility statement, inclusive design Scotland, RDA accessibility",
+ canonicalPath: "/accessibility",
};
---
-
+
-
+
diff --git a/src/pages/contact.astro b/src/pages/contact.astro
index 46e3f97..6563efb 100644
--- a/src/pages/contact.astro
+++ b/src/pages/contact.astro
@@ -1,22 +1,22 @@
---
-import Base from "../layouts/Base.astro";
+import BaseLayout from "../layouts/BaseLayout.astro";
import SiteHeader from "../components/SiteHeader.astro";
import SiteFooter from "../components/SiteFooter.astro";
import { navigationItems } from "../lib/navigation";
const pageSeo = {
title: "Contact",
- path: "/contact",
description:
"Contact Highland Group RDA for bookings, volunteering, or enquiries. We're here to help you connect with our team and activities in the Highlands.",
keywords:
"Highland Group RDA contact, RDA enquiries, book RDA session, volunteer at RDA, RDA Highlands contact details, disability riding information",
+ canonicalPath: "/contact",
};
const turnstileSiteKey = import.meta.env.PUBLIC_TURNSTILE_SITE_KEY ?? "";
---
-
+
{
turnstileSiteKey && (
@@ -223,4 +223,4 @@ const turnstileSiteKey = import.meta.env.PUBLIC_TURNSTILE_SITE_KEY ?? "";
-
+
diff --git a/src/pages/events/index.astro b/src/pages/events/index.astro
index bdeba47..3615d06 100644
--- a/src/pages/events/index.astro
+++ b/src/pages/events/index.astro
@@ -1,5 +1,5 @@
---
-import Base from "../../layouts/Base.astro";
+import BaseLayout from "../../layouts/BaseLayout.astro";
import SiteHeader from "../../components/SiteHeader.astro";
import SiteFooter from "../../components/SiteFooter.astro";
import { navigationItems } from "../../lib/navigation";
@@ -7,15 +7,15 @@ import { newsArticles, formatNewsDate } from "../../lib/news";
const pageSeo = {
title: "News",
- path: "/events",
description:
"Stay updated with Highland Group RDA news, events, and stories. Discover how our riders, volunteers, and community are making a difference every day.",
keywords:
"Highland RDA news, RDA events, disability riding stories, RDA updates, equestrian therapy news, Highlands charity events",
+ canonicalPath: "/events",
};
---
-
+
@@ -113,4 +113,4 @@ const pageSeo = {
-
+
diff --git a/src/pages/facebook.astro b/src/pages/facebook.astro
index e043d29..e8b614b 100644
--- a/src/pages/facebook.astro
+++ b/src/pages/facebook.astro
@@ -1,5 +1,5 @@
---
-import Base from "../layouts/Base.astro";
+import BaseLayout from "../layouts/BaseLayout.astro";
import SiteHeader from "../components/SiteHeader.astro";
import SiteFooter from "../components/SiteFooter.astro";
import { navigationItems } from "../lib/navigation";
@@ -11,15 +11,15 @@ const facebookEmbedUrl =
const pageSeo = {
title: "Facebook",
- path: "/facebook",
description:
"Follow Highland Group RDA on Facebook to see the latest updates, photos, events, and stories from our riders, volunteers, and community.",
keywords:
"Highland Group RDA Facebook, RDA social media, Highland RDA updates, RDA events Facebook, therapeutic riding community",
+ canonicalPath: "/facebook",
};
---
-
+
@@ -101,4 +101,4 @@ const pageSeo = {
-
+
diff --git a/src/pages/index.astro b/src/pages/index.astro
index 095c9d6..4f43ef1 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -1,16 +1,16 @@
---
-import Base from "../layouts/Base.astro";
+import BaseLayout from "../layouts/BaseLayout.astro";
import SiteHeader from "../components/SiteHeader.astro";
import SiteFooter from "../components/SiteFooter.astro";
import { navigationItems } from "../lib/navigation";
const pageSeo = {
- title: "Home",
- path: "/",
+ title: "Highland Group RDA",
description:
"Highland Group RDA provides horse riding for people with disabilities in the Highlands, offering safe, fun, and therapeutic equestrian activities.",
keywords:
"Highland Group RDA, horse riding for disabilities, therapeutic riding Highlands, RDA Scotland, equestrian therapy, disability riding lessons",
+ canonicalPath: "/",
};
const cardData = [
@@ -35,7 +35,7 @@ const cardData = [
];
---
-
+
-
+
diff --git a/src/pages/privacy.astro b/src/pages/privacy.astro
index a4f0e32..a5de52e 100644
--- a/src/pages/privacy.astro
+++ b/src/pages/privacy.astro
@@ -1,20 +1,20 @@
---
-import Base from "../layouts/Base.astro";
+import BaseLayout from "../layouts/BaseLayout.astro";
import SiteHeader from "../components/SiteHeader.astro";
import SiteFooter from "../components/SiteFooter.astro";
import { navigationItems } from "../lib/navigation";
const pageSeo = {
title: "Privacy Policy",
- path: "/privacy",
description:
"Read Highland Group RDA's Privacy Policy to learn how we collect, use, and protect your personal information in line with data protection laws.",
keywords:
"Highland Group RDA privacy policy, data protection RDA, GDPR compliance Scotland, RDA data use, protect personal information",
+ canonicalPath: "/privacy",
};
---
-
+
-
+
diff --git a/src/pages/support-us.astro b/src/pages/support-us.astro
index 5903034..8dae07b 100644
--- a/src/pages/support-us.astro
+++ b/src/pages/support-us.astro
@@ -1,20 +1,20 @@
---
-import Base from "../layouts/Base.astro";
+import BaseLayout from "../layouts/BaseLayout.astro";
import SiteHeader from "../components/SiteHeader.astro";
import SiteFooter from "../components/SiteFooter.astro";
import { navigationItems } from "../lib/navigation";
const pageSeo = {
title: "Support Us",
- path: "/support-us",
description:
"Support Highland Group RDA through donations, volunteering, or fundraising. Help us provide free, life-changing horse riding sessions in the Highlands.",
keywords:
"Support Highland RDA, donate to RDA, RDA fundraising, volunteer with RDA, charity donations Scotland, equestrian therapy support",
+ canonicalPath: "/support-us",
};
---
-
+
@@ -356,4 +356,4 @@ const pageSeo = {
-
+