diff --git a/src/handlers/home.tsx b/src/handlers/home.tsx
index f57a772..b3fcf74 100644
--- a/src/handlers/home.tsx
+++ b/src/handlers/home.tsx
@@ -23,6 +23,7 @@ app.get("/", async (c) => {
return c.render(, {
meta: {
description: "The blog for Dave Smith-Hayes, a dad and developer.",
+ mastodonUrl: "https://hachyderm.io/@davesh"
},
});
});
diff --git a/src/models/SiteMeta.ts b/src/models/SiteMeta.ts
index 6a0e3dd..355ac07 100644
--- a/src/models/SiteMeta.ts
+++ b/src/models/SiteMeta.ts
@@ -4,4 +4,5 @@ export type SiteMeta = {
author?: string,
viewport?: string,
title?: string,
+ mastodonUrl?: string,
};
diff --git a/src/templates/Page.tsx b/src/templates/Page.tsx
index 35aca2f..2f4080d 100644
--- a/src/templates/Page.tsx
+++ b/src/templates/Page.tsx
@@ -16,7 +16,6 @@ export function Page({ children, meta }: { children: any, meta: SiteMeta }) {
{ getPageTitle(meta.title) }davesmithhayes.com
-
diff --git a/src/templates/components/MetaTags.tsx b/src/templates/components/MetaTags.tsx
index 695ce15..907ed41 100644
--- a/src/templates/components/MetaTags.tsx
+++ b/src/templates/components/MetaTags.tsx
@@ -36,6 +36,16 @@ export function ViewPort({ meta }: { meta: SiteMeta }) {
return ();
}
+export function MeRel({ meta }: { meta: SiteMeta }) {
+ if (!meta?.mastodonUrl) {
+ return (
+ <>>
+ );
+ }
+
+ return ();
+}
+
export function MetaTags({ meta }: { meta: SiteMeta }) {
return (
<>