From 2ced04c0ccfcf5f791478cb9a0fbd5dfa755e4fa Mon Sep 17 00:00:00 2001 From: Neeldhara Misra Date: Thu, 25 Jun 2026 16:20:49 +0530 Subject: [PATCH] Rename poetry links to pieces --- content/blog-index.json | 16 ++++++++-------- scripts/build.mjs | 15 ++++++++++----- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/content/blog-index.json b/content/blog-index.json index a6b5d84..c32a229 100644 --- a/content/blog-index.json +++ b/content/blog-index.json @@ -142,49 +142,49 @@ "poetry": [ { "title": "Winning", - "link": "https://poetry.neeldhara.blog/poems/winning/", + "link": "https://pieces.neeldhara.blog/poems/winning/", "date": "2024-01-13", "featured": false }, { "title": "Poetry", - "link": "https://poetry.neeldhara.blog/poems/poetry/", + "link": "https://pieces.neeldhara.blog/poems/poetry/", "date": "2024-01-01", "featured": true }, { "title": "Letting Go", - "link": "https://poetry.neeldhara.blog/poems/letting-go/", + "link": "https://pieces.neeldhara.blog/poems/letting-go/", "date": "2023-05-11", "featured": false }, { "title": "Dad", - "link": "https://poetry.neeldhara.blog/poems/dad/", + "link": "https://pieces.neeldhara.blog/poems/dad/", "date": "2012-08-27", "featured": false }, { "title": "On the Fence", - "link": "https://poetry.neeldhara.blog/poems/on-the-fence/", + "link": "https://pieces.neeldhara.blog/poems/on-the-fence/", "date": "2012-04-23", "featured": false }, { "title": "Sprinkles of the Sky", - "link": "https://poetry.neeldhara.blog/poems/sprinkles-of-the-sky/", + "link": "https://pieces.neeldhara.blog/poems/sprinkles-of-the-sky/", "date": "2011-01-05", "featured": false }, { "title": "Seek", - "link": "https://poetry.neeldhara.blog/poems/seek/", + "link": "https://pieces.neeldhara.blog/poems/seek/", "date": "2007-04-03", "featured": false }, { "title": "Bloom", - "link": "https://poetry.neeldhara.blog/poems/bloom/", + "link": "https://pieces.neeldhara.blog/poems/bloom/", "date": "2005-02-03", "featured": false } diff --git a/scripts/build.mjs b/scripts/build.mjs index 710afd5..a6178d0 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -32,8 +32,9 @@ const blogs = [ }, { slug: "poetry", - label: "Poetry", - summary: "Poems, tiny forms, and playful writing around mathematics, code, and ordinary life.", + host: "pieces", + label: "Pieces", + summary: "Poems, short prose, and small experiments in language.", }, { slug: "reviews", @@ -186,6 +187,10 @@ function slugFromFile(filePath, contentDir) { return relative.replace(/\/index\.mdx?$/i, "").replace(/\.mdx?$/i, ""); } +function publicSlug(blog) { + return blog.host ?? blog.slug; +} + async function getLocalPosts(blog) { const contentDir = fileURLToPath( new URL(`sites/${blog.slug}/src/content/${blog.slug}/`, allblogsRoot), @@ -210,7 +215,7 @@ async function getLocalPosts(blog) { posts.push({ title: data.title, - link: `https://${blog.slug}.${publicHostSuffix}/${slug}/`, + link: `https://${publicSlug(blog)}.${publicHostSuffix}/${slug}/`, date: pubDate.toISOString().slice(0, 10), featured: data["main-feature"] === true || data.mainFeature === true, }); @@ -257,7 +262,7 @@ function renderFeaturedPost(post) { } function renderRssIcon(blog) { - const href = `https://${blog.slug}.${publicHostSuffix}/rss.xml`; + const href = `https://${publicSlug(blog)}.${publicHostSuffix}/rss.xml`; return `