feat: remove hardcoded descriptions
This commit is contained in:
@@ -2,6 +2,8 @@ export type Global = {
|
|||||||
name: string;
|
name: string;
|
||||||
about: string;
|
about: string;
|
||||||
about_description: string;
|
about_description: string;
|
||||||
|
about_blog: string;
|
||||||
|
about_categories: string;
|
||||||
initials: string;
|
initials: string;
|
||||||
email: string;
|
email: string;
|
||||||
site_url: string;
|
site_url: string;
|
||||||
|
|||||||
@@ -19,14 +19,11 @@ const posts = await directus.request(
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
const selectedPosts: Post[] = posts.filter((p) => p.selected);
|
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
|
<BaseLayout
|
||||||
title="Blog"
|
title="Blog"
|
||||||
description={description}
|
description={global.about_blog}
|
||||||
structuredData={{
|
structuredData={{
|
||||||
'@context': 'https://schema.org',
|
'@context': 'https://schema.org',
|
||||||
'@type': 'WebPage',
|
'@type': 'WebPage',
|
||||||
@@ -34,7 +31,7 @@ const description =
|
|||||||
'@id': Astro.url.href,
|
'@id': Astro.url.href,
|
||||||
url: Astro.url.href,
|
url: Astro.url.href,
|
||||||
name: `Blog | ${global.name}`,
|
name: `Blog | ${global.name}`,
|
||||||
description: description,
|
description: global.about_blog,
|
||||||
isPartOf: {
|
isPartOf: {
|
||||||
'@type': 'WebSite',
|
'@type': 'WebSite',
|
||||||
url: global.site_url,
|
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} />
|
<BlogRecentCard posts={posts} />
|
||||||
<BlogFeaturedArticle posts={selectedPosts} />
|
<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
|
<BaseLayout
|
||||||
title="All Categories"
|
title="All Categories"
|
||||||
description={description}
|
description={global.about_categories}
|
||||||
structuredData={{
|
structuredData={{
|
||||||
'@context': 'https://schema.org',
|
'@context': 'https://schema.org',
|
||||||
'@type': 'WebPage',
|
'@type': 'WebPage',
|
||||||
@@ -88,7 +85,7 @@ const description =
|
|||||||
'@id': Astro.url.href,
|
'@id': Astro.url.href,
|
||||||
url: Astro.url.href,
|
url: Astro.url.href,
|
||||||
name: `All Categories | ${global.name}`,
|
name: `All Categories | ${global.name}`,
|
||||||
description: description,
|
description: global.about_categories,
|
||||||
isPartOf: {
|
isPartOf: {
|
||||||
'@type': 'WebSite',
|
'@type': 'WebSite',
|
||||||
url: global.site_url,
|
url: global.site_url,
|
||||||
@@ -99,7 +96,7 @@ const description =
|
|||||||
>
|
>
|
||||||
<HeroSection
|
<HeroSection
|
||||||
title="Categories"
|
title="Categories"
|
||||||
subTitle={description}
|
subTitle={global.about_categories}
|
||||||
src={categoryImg}
|
src={categoryImg}
|
||||||
alt={global.categories_image_alt}
|
alt={global.categories_image_alt}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user