feat: remove hardcoded descriptions
This commit is contained in:
@@ -2,6 +2,8 @@ export type Global = {
|
||||
name: string;
|
||||
about: string;
|
||||
about_description: string;
|
||||
about_blog: string;
|
||||
about_categories: string;
|
||||
initials: string;
|
||||
email: string;
|
||||
site_url: string;
|
||||
|
||||
@@ -19,14 +19,11 @@ const posts = await directus.request(
|
||||
})
|
||||
);
|
||||
const selectedPosts: Post[] = posts.filter((p) => p.selected);
|
||||
|
||||
const description =
|
||||
"Sharing what I've learned, one post at a time. I hope you find something useful.";
|
||||
---
|
||||
|
||||
<BaseLayout
|
||||
title="Blog"
|
||||
description={description}
|
||||
description={global.about_blog}
|
||||
structuredData={{
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'WebPage',
|
||||
@@ -34,7 +31,7 @@ const description =
|
||||
'@id': Astro.url.href,
|
||||
url: Astro.url.href,
|
||||
name: `Blog | ${global.name}`,
|
||||
description: description,
|
||||
description: global.about_blog,
|
||||
isPartOf: {
|
||||
'@type': 'WebSite',
|
||||
url: global.site_url,
|
||||
@@ -43,7 +40,7 @@ const description =
|
||||
},
|
||||
}}
|
||||
>
|
||||
<HeroSection title="Blog" subTitle={description} src={blogImg} alt={global.blog_image_alt} />
|
||||
<HeroSection title="Blog" subTitle={global.about_blog} src={blogImg} alt={global.blog_image_alt} />
|
||||
|
||||
<BlogRecentCard posts={posts} />
|
||||
<BlogFeaturedArticle posts={selectedPosts} />
|
||||
|
||||
@@ -73,14 +73,11 @@ const categories = (await getCollection('categories'))
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
const description =
|
||||
'Here are some of the general categories that I am interested in, including homelabs, technology, and Minnesota.';
|
||||
---
|
||||
|
||||
<BaseLayout
|
||||
title="All Categories"
|
||||
description={description}
|
||||
description={global.about_categories}
|
||||
structuredData={{
|
||||
'@context': 'https://schema.org',
|
||||
'@type': 'WebPage',
|
||||
@@ -88,7 +85,7 @@ const description =
|
||||
'@id': Astro.url.href,
|
||||
url: Astro.url.href,
|
||||
name: `All Categories | ${global.name}`,
|
||||
description: description,
|
||||
description: global.about_categories,
|
||||
isPartOf: {
|
||||
'@type': 'WebSite',
|
||||
url: global.site_url,
|
||||
@@ -99,7 +96,7 @@ const description =
|
||||
>
|
||||
<HeroSection
|
||||
title="Categories"
|
||||
subTitle={description}
|
||||
subTitle={global.about_categories}
|
||||
src={categoryImg}
|
||||
alt={global.categories_image_alt}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user