Add some meta to the site for mastodon, and remove the style tag.
This commit is contained in:
parent
046830730c
commit
7f5aac05c4
@ -23,6 +23,7 @@ app.get("/", async (c) => {
|
|||||||
return c.render(<Home posts={postList} />, {
|
return c.render(<Home posts={postList} />, {
|
||||||
meta: {
|
meta: {
|
||||||
description: "The blog for Dave Smith-Hayes, a dad and developer.",
|
description: "The blog for Dave Smith-Hayes, a dad and developer.",
|
||||||
|
mastodonUrl: "https://hachyderm.io/@davesh"
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -4,4 +4,5 @@ export type SiteMeta = {
|
|||||||
author?: string,
|
author?: string,
|
||||||
viewport?: string,
|
viewport?: string,
|
||||||
title?: string,
|
title?: string,
|
||||||
|
mastodonUrl?: string,
|
||||||
};
|
};
|
||||||
|
@ -16,7 +16,6 @@ export function Page({ children, meta }: { children: any, meta: SiteMeta }) {
|
|||||||
<head>
|
<head>
|
||||||
<title>{ getPageTitle(meta.title) }davesmithhayes.com</title>
|
<title>{ getPageTitle(meta.title) }davesmithhayes.com</title>
|
||||||
<MetaTags meta={meta} />
|
<MetaTags meta={meta} />
|
||||||
<Style />
|
|
||||||
<link rel="stylesheet" href="/static/main.css" />
|
<link rel="stylesheet" href="/static/main.css" />
|
||||||
<link rel="stylesheet" href="/static/intellij-light.min.css" />
|
<link rel="stylesheet" href="/static/intellij-light.min.css" />
|
||||||
</head>
|
</head>
|
||||||
|
@ -36,6 +36,16 @@ export function ViewPort({ meta }: { meta: SiteMeta }) {
|
|||||||
return (<meta name="viewport" content={meta.viewport} />);
|
return (<meta name="viewport" content={meta.viewport} />);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function MeRel({ meta }: { meta: SiteMeta }) {
|
||||||
|
if (!meta?.mastodonUrl) {
|
||||||
|
return (
|
||||||
|
<></>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (<link rel="me" href={meta.mastodonUrl} />);
|
||||||
|
}
|
||||||
|
|
||||||
export function MetaTags({ meta }: { meta: SiteMeta }) {
|
export function MetaTags({ meta }: { meta: SiteMeta }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
Loading…
Reference in New Issue
Block a user