From d959af246da58b26ebeee4883d4206c4543c8fa4 Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Sun, 11 Jun 2023 16:16:02 +0200 Subject: [PATCH] feat: add title and description to all pages --- src/pages/[...slug].astro | 2 +- src/pages/ai-art.astro | 2 +- src/pages/ai-art/[...slug].astro | 2 +- src/pages/colophon.mdx | 2 +- src/pages/cv.astro | 3 ++- src/pages/haiku.astro | 3 ++- src/pages/haiku/[...slug].astro | 2 +- src/pages/imprint.mdx | 2 +- src/pages/index.astro | 4 ++-- src/pages/now.mdx | 2 +- src/pages/projects/[...slug].astro | 2 +- src/pages/sketchnotes/[...slug].astro | 2 +- src/pages/tag.astro | 2 +- src/pages/tag/[tag].astro | 8 +++++--- src/pages/tools.mdx | 2 +- 15 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/pages/[...slug].astro b/src/pages/[...slug].astro index 9145837..c5ba9e8 100644 --- a/src/pages/[...slug].astro +++ b/src/pages/[...slug].astro @@ -45,7 +45,7 @@ const seriesEntries = await getCollection('journal', ({ data }) => { seriesEntries.sort(sortByDate).reverse(); const title = entry.data.title; -const description = '…'; +const description = entry.data.description; --- diff --git a/src/pages/ai-art.astro b/src/pages/ai-art.astro index a82857d..4456aff 100644 --- a/src/pages/ai-art.astro +++ b/src/pages/ai-art.astro @@ -19,7 +19,7 @@ const allAiArt = await getCollection('ai-art'); allAiArt.sort(sortBySortKey); const title = 'AI Art'; -const description = '…'; +const description = 'This is a collection of AI art pieces I’ve created with Stable Diffusion.'; --- diff --git a/src/pages/ai-art/[...slug].astro b/src/pages/ai-art/[...slug].astro index 040fc96..cbbf467 100644 --- a/src/pages/ai-art/[...slug].astro +++ b/src/pages/ai-art/[...slug].astro @@ -30,7 +30,7 @@ const { entry, prev, next } = Astro.props; const { Content } = await entry.render(); const title = entry.data.title; -const description = '…'; +const description = `The AI generated art for "${entry.data.title}".`; --- diff --git a/src/pages/colophon.mdx b/src/pages/colophon.mdx index 123894e..0bcded5 100644 --- a/src/pages/colophon.mdx +++ b/src/pages/colophon.mdx @@ -1,7 +1,7 @@ --- layout: ../layouts/PageLayout.astro 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. --- diff --git a/src/pages/cv.astro b/src/pages/cv.astro index e0a6acf..4221dfc 100644 --- a/src/pages/cv.astro +++ b/src/pages/cv.astro @@ -23,7 +23,8 @@ import { Content as InterestsHobbies } from '../text/cv/interests-hobbies.mdx'; import { mapping } from '../mdx-components'; const title = 'CV'; -const description = ''; +const description = + 'The curriculum vitae of Stefan Imhoff, Senior Software Engineer from Hamburg, Germany.'; --- diff --git a/src/pages/haiku.astro b/src/pages/haiku.astro index 213ff94..72d0e81 100644 --- a/src/pages/haiku.astro +++ b/src/pages/haiku.astro @@ -15,7 +15,8 @@ const allHaiku = await getCollection('haiku'); allHaiku.sort(sortByDate).reverse(); 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.'; --- diff --git a/src/pages/haiku/[...slug].astro b/src/pages/haiku/[...slug].astro index b36f43a..b493cc3 100644 --- a/src/pages/haiku/[...slug].astro +++ b/src/pages/haiku/[...slug].astro @@ -28,7 +28,7 @@ export async function getStaticPaths() { const { entry, prev, next } = Astro.props; const title = `Haiku ${entry.slug}`; -const description = '…'; +const description = `Haiku ${entry.slug} in German and English.`; --- diff --git a/src/pages/imprint.mdx b/src/pages/imprint.mdx index b7bf39d..c12c707 100644 --- a/src/pages/imprint.mdx +++ b/src/pages/imprint.mdx @@ -1,7 +1,7 @@ --- layout: ../layouts/PageLayout.astro title: Imprint -description: … +description: The imprint of this website. --- import { mapping } from "../mdx-components.ts"; diff --git a/src/pages/index.astro b/src/pages/index.astro index cf16939..d41df79 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -23,8 +23,8 @@ import { mapping } from '../mdx-components'; const allPosts = await getCollection('journal'); const formattedLatest = formatPosts(allPosts, { limit: 6 }); -const title = 'Home'; -const description = '…'; +const title = 'Stefan Imhoff'; +const description = 'Front-End Web Developer from Hamburg, Germany'; --- diff --git a/src/pages/now.mdx b/src/pages/now.mdx index e76d292..0e44841 100644 --- a/src/pages/now.mdx +++ b/src/pages/now.mdx @@ -1,7 +1,7 @@ --- layout: ../layouts/PageLayout.astro title: Now -description: … +description: This is my Now page, listing the things I currently do. --- import { animation, animationDelay } from "../data/site"; diff --git a/src/pages/projects/[...slug].astro b/src/pages/projects/[...slug].astro index 520532b..35262c1 100644 --- a/src/pages/projects/[...slug].astro +++ b/src/pages/projects/[...slug].astro @@ -33,7 +33,7 @@ const { entry, prev, next } = Astro.props; const { Content } = await entry.render(); const title = entry.data.title; -const description = '…'; +const description = entry.data.intro || `The detail for project "${entry.data.title}"`; --- diff --git a/src/pages/sketchnotes/[...slug].astro b/src/pages/sketchnotes/[...slug].astro index 8951549..43b06c9 100644 --- a/src/pages/sketchnotes/[...slug].astro +++ b/src/pages/sketchnotes/[...slug].astro @@ -32,7 +32,7 @@ const { entry, prev, next } = Astro.props; const { Content } = await entry.render(); const title = entry.data.title; -const description = '…'; +const description = `The sketchnote for "${entry.data.title}."`; --- diff --git a/src/pages/tag.astro b/src/pages/tag.astro index a4e2e48..c3b3cda 100644 --- a/src/pages/tag.astro +++ b/src/pages/tag.astro @@ -12,7 +12,7 @@ const uniqueTags = [...new Set(allJournal.map((entry) => entry.data.tags).flat() uniqueTags.sort((a, b) => a.localeCompare(b)); const title = 'Tags'; -const description = '…'; +const description = 'This is a list of all the tags used in my journal.'; ---