chore: add some seo options and params

This commit is contained in:
Rick van Lieshout 2023-04-03 14:16:11 +02:00
parent 99d42b8de4
commit abc9cdbe26
6 changed files with 13 additions and 4 deletions

View File

@ -37,7 +37,7 @@
], ],
"author": { "author": {
"name": "Rick van Lieshout", "name": "Rick van Lieshout",
"photo": "/me.png", "photo": "/content/me.png",
"bio": "I'm a passionate software architect that bifurcates his love between great software development and leading others to learn and adopt new things.", "bio": "I'm a passionate software architect that bifurcates his love between great software development and leading others to learn and adopt new things.",
"contacts": { "contacts": {
"email": "info@rickvanlieshout.com", "email": "info@rickvanlieshout.com",

View File

@ -7,6 +7,7 @@ tags:
- "Lego" - "Lego"
- "house" - "house"
description: "What started as a simple decoration piece to fill some empty space in my home quickly grew into a new hobby of which the remnants can be found throughout my house" description: "What started as a simple decoration piece to fill some empty space in my home quickly grew into a new hobby of which the remnants can be found throughout my house"
socialImage: /media/building-the-owl.jpg
--- ---
## The problem ## The problem

View File

@ -1,7 +1,7 @@
import contacts from "./contacts"; import contacts from "./contacts";
export default { export default {
photo: "/me.png", photo: "/content/me.png",
bio: "", bio: "",
name: "Rick van Lieshout", name: "Rick van Lieshout",
contacts, contacts,

View File

@ -10,9 +10,16 @@ interface Props {
description?: string; description?: string;
socialImage?: string; socialImage?: string;
children: React.ReactNode; children: React.ReactNode;
noIndex?: boolean;
} }
const Layout: React.FC<Props> = ({ children, title, description, socialImage = "" }: Props) => { const Layout: React.FC<Props> = ({
children,
title,
description,
socialImage = "",
noIndex = false,
}: Props) => {
const { author, url } = useSiteMetadata(); const { author, url } = useSiteMetadata();
const metaImage = socialImage || author.photo; const metaImage = socialImage || author.photo;
const metaImageUrl = url + metaImage; const metaImageUrl = url + metaImage;
@ -29,6 +36,7 @@ const Layout: React.FC<Props> = ({ children, title, description, socialImage = "
<meta name="twitter:title" content={title} /> <meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} /> <meta name="twitter:description" content={description} />
<meta name="twitter:image" content={metaImageUrl} /> <meta name="twitter:image" content={metaImageUrl} />
{noIndex && <meta name="robots" content="noindex" />}
</Helmet> </Helmet>
{children} {children}
<CookieBar /> <CookieBar />

View File

@ -28,7 +28,7 @@ const TagTemplate: React.FC<Props> = ({ data, pageContext }: Props) => {
currentPage > 0 ? `${group} - Page ${currentPage} - ${siteTitle}` : `${group} - ${siteTitle}`; currentPage > 0 ? `${group} - Page ${currentPage} - ${siteTitle}` : `${group} - ${siteTitle}`;
return ( return (
<Layout title={pageTitle} description={siteSubtitle}> <Layout title={pageTitle} description={siteSubtitle} noIndex>
<Sidebar /> <Sidebar />
<Page title={group}> <Page title={group}>
<Feed edges={edges} /> <Feed edges={edges} />

BIN
static/content/me.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB