From 9e177b5b526ad1200f6cd3943dabc5f32eab0eda Mon Sep 17 00:00:00 2001 From: Ayo Ayco Date: Tue, 11 Feb 2025 19:25:51 +0100 Subject: [PATCH] fix: now publishedOn empty --- commands/now-template | 4 +++- src/pages/now/and-then/posts/2025-02-05.astro | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/commands/now-template b/commands/now-template index 10c1591..bce6372 100644 --- a/commands/now-template +++ b/commands/now-template @@ -4,10 +4,12 @@ import Footer from '../../../../components/Footer.astro' const title = `__title__` const description = `__description__` -const publishedOn = `__publishedOn__` +let publishedOn = `__publishedOn__` const publishDate = `__publishDate__` const publishState = `__publishState__` const content = `__content__` + +publishedOn = publishedOn === '' ? publishDate : publishedOn --- diff --git a/src/pages/now/and-then/posts/2025-02-05.astro b/src/pages/now/and-then/posts/2025-02-05.astro index 3e12c74..3095482 100644 --- a/src/pages/now/and-then/posts/2025-02-05.astro +++ b/src/pages/now/and-then/posts/2025-02-05.astro @@ -4,7 +4,7 @@ import Footer from '../../../../components/Footer.astro' const title = `Binge-watching, playing, and recovering` const description = `` -const publishedOn = `` +let publishedOn = `` const publishDate = `2025-02-05` const publishState = `` const content = `

Binge-watched Arcane season 2

@@ -14,6 +14,8 @@ const content = `

Binge-watched ` + +publishedOn = publishedOn === '' ? publishDate : publishedOn ---