feat: add title and description to all pages

This commit is contained in:
Stefan Imhoff
2023-06-11 16:16:02 +02:00
parent 47d451e4d9
commit d959af246d
15 changed files with 22 additions and 18 deletions

View File

@@ -45,7 +45,7 @@ const seriesEntries = await getCollection('journal', ({ data }) => {
seriesEntries.sort(sortByDate).reverse(); seriesEntries.sort(sortByDate).reverse();
const title = entry.data.title; const title = entry.data.title;
const description = '…'; const description = entry.data.description;
--- ---
<GridLayout title={title} description={description} grid="fullsize" innerGrid backLink="/journal/"> <GridLayout title={title} description={description} grid="fullsize" innerGrid backLink="/journal/">

View File

@@ -19,7 +19,7 @@ const allAiArt = await getCollection('ai-art');
allAiArt.sort(sortBySortKey); allAiArt.sort(sortBySortKey);
const title = 'AI Art'; const title = 'AI Art';
const description = ''; const description = 'This is a collection of AI art pieces Ive created with Stable Diffusion.';
--- ---
<GridLayout title={title} description={description} grid="wide" class="grid" innerGrid> <GridLayout title={title} description={description} grid="wide" class="grid" innerGrid>

View File

@@ -30,7 +30,7 @@ const { entry, prev, next } = Astro.props;
const { Content } = await entry.render(); const { Content } = await entry.render();
const title = entry.data.title; const title = entry.data.title;
const description = '…'; const description = `The AI generated art for "${entry.data.title}".`;
--- ---
<BaseLayout title={title} description={description} header={false} footer={false}> <BaseLayout title={title} description={description} header={false} footer={false}>

View File

@@ -1,7 +1,7 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ../layouts/PageLayout.astro
title: Colophon title: Colophon
description: description: The design and technology behind this website explained.
intro: In publishing, a colophon is a brief statement containing information about the publication. intro: In publishing, a colophon is a brief statement containing information about the publication.
--- ---

View File

@@ -23,7 +23,8 @@ import { Content as InterestsHobbies } from '../text/cv/interests-hobbies.mdx';
import { mapping } from '../mdx-components'; import { mapping } from '../mdx-components';
const title = 'CV'; const title = 'CV';
const description = ''; const description =
'The curriculum vitae of Stefan Imhoff, Senior Software Engineer from Hamburg, Germany.';
--- ---
<GridLayout title={title} description={description} grid="wide" class="grid" innerGrid> <GridLayout title={title} description={description} grid="wide" class="grid" innerGrid>

View File

@@ -15,7 +15,8 @@ const allHaiku = await getCollection('haiku');
allHaiku.sort(sortByDate).reverse(); allHaiku.sort(sortByDate).reverse();
const title = 'Haiku'; const title = 'Haiku';
const description = '…'; const description =
'This is an ever-growing collection of Haiku I have written. My Haiku reflect my own unique perspective on the world, and I hope they bring a bit of beauty and insight to the reader.';
--- ---
<GridLayout title={title} description={description} grid="wide" class="grid" innerGrid> <GridLayout title={title} description={description} grid="wide" class="grid" innerGrid>

View File

@@ -28,7 +28,7 @@ export async function getStaticPaths() {
const { entry, prev, next } = Astro.props; const { entry, prev, next } = Astro.props;
const title = `Haiku ${entry.slug}`; const title = `Haiku ${entry.slug}`;
const description = '…'; const description = `Haiku ${entry.slug} in German and English.`;
--- ---
<BaseLayout title={title} description={description} header={false} footer={false}> <BaseLayout title={title} description={description} header={false} footer={false}>

View File

@@ -1,7 +1,7 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ../layouts/PageLayout.astro
title: Imprint title: Imprint
description: description: The imprint of this website.
--- ---
import { mapping } from "../mdx-components.ts"; import { mapping } from "../mdx-components.ts";

View File

@@ -23,8 +23,8 @@ import { mapping } from '../mdx-components';
const allPosts = await getCollection('journal'); const allPosts = await getCollection('journal');
const formattedLatest = formatPosts(allPosts, { limit: 6 }); const formattedLatest = formatPosts(allPosts, { limit: 6 });
const title = 'Home'; const title = 'Stefan Imhoff';
const description = ''; const description = 'Front-End Web Developer from Hamburg, Germany';
--- ---
<GridLayout title={title} description={description} grid="fullsize" class="grid" innerGrid> <GridLayout title={title} description={description} grid="fullsize" class="grid" innerGrid>

View File

@@ -1,7 +1,7 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ../layouts/PageLayout.astro
title: Now title: Now
description: description: This is my Now page, listing the things I currently do.
--- ---
import { animation, animationDelay } from "../data/site"; import { animation, animationDelay } from "../data/site";

View File

@@ -33,7 +33,7 @@ const { entry, prev, next } = Astro.props;
const { Content } = await entry.render(); const { Content } = await entry.render();
const title = entry.data.title; const title = entry.data.title;
const description = '…'; const description = entry.data.intro || `The detail for project "${entry.data.title}"`;
--- ---
<GridLayout title={title} description={description} grid="wide" innerGrid backLink="/projects/"> <GridLayout title={title} description={description} grid="wide" innerGrid backLink="/projects/">

View File

@@ -32,7 +32,7 @@ const { entry, prev, next } = Astro.props;
const { Content } = await entry.render(); const { Content } = await entry.render();
const title = entry.data.title; const title = entry.data.title;
const description = '…'; const description = `The sketchnote for "${entry.data.title}."`;
--- ---
<BaseLayout title={title} description={description} header={false} footer={false}> <BaseLayout title={title} description={description} header={false} footer={false}>

View File

@@ -12,7 +12,7 @@ const uniqueTags = [...new Set(allJournal.map((entry) => entry.data.tags).flat()
uniqueTags.sort((a, b) => a.localeCompare(b)); uniqueTags.sort((a, b) => a.localeCompare(b));
const title = 'Tags'; const title = 'Tags';
const description = ''; const description = 'This is a list of all the tags used in my journal.';
--- ---
<GridLayout <GridLayout

View File

@@ -1,7 +1,7 @@
--- ---
import { getCollection } from 'astro:content'; import { getCollection } from 'astro:content';
import { formatPosts } from '../../utils'; import { formatPosts, titleCase } from '../../utils';
import { animationDelay } from '../../data/site'; import { animationDelay } from '../../data/site';
import GridLayout from '../../layouts/GridLayout.astro'; import GridLayout from '../../layouts/GridLayout.astro';
@@ -39,8 +39,10 @@ export async function getStaticPaths() {
const { tag } = Astro.params; const { tag } = Astro.params;
const { entries, uniqueTags } = Astro.props; const { entries, uniqueTags } = Astro.props;
const title = 'Journal'; const title = `Tag: ${titleCase(tag || '')}`;
const description = '…'; const description = `These are all the articles categorized with the tag "${titleCase(
tag || ''
)}".`;
--- ---
<GridLayout <GridLayout

View File

@@ -1,7 +1,7 @@
--- ---
layout: ../layouts/PageLayout.astro layout: ../layouts/PageLayout.astro
title: Tools title: Tools
description: description: I enjoy learning how other people work, what hardware, software, tools, and gadgets they use. On this page, I present my tools.
intro: I enjoy learning how other people work, what hardware, software, tools, and gadgets they use. On this page, I present my tools. intro: I enjoy learning how other people work, what hardware, software, tools, and gadgets they use. On this page, I present my tools.
cover: /assets/images/cover/home-office.jpg cover: /assets/images/cover/home-office.jpg
--- ---