From aa7f92275cf913a581fec81435fd69912a424233 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Sun, 8 Feb 2026 21:35:02 +0100 Subject: [PATCH] fix: add a initial date --- packages/cli/src/commands/publish.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/commands/publish.ts b/packages/cli/src/commands/publish.ts index cedd58d..4998076 100644 --- a/packages/cli/src/commands/publish.ts +++ b/packages/cli/src/commands/publish.ts @@ -250,7 +250,7 @@ export const publishCommand = command({ postUrl = `\n ${config.siteUrl}${postPath}`; } log.message( - ` ${icon} ${post.frontmatter.title} (${reason})${bskyNote}${postUrl}`, + ` ${icon} ${post.filePath} (${reason})${bskyNote}${postUrl}`, ); } @@ -298,6 +298,12 @@ export const publishCommand = command({ for (const { post, action } of postsToPublish) { s.start(`Publishing: ${post.frontmatter.title}`); + // Init publish date + if (!post.frontmatter.publishDate) { + const [publishDate] = new Date().toISOString().split("T") + post.frontmatter.publishDate = publishDate! + } + try { // Handle cover image upload let coverImage: BlobObject | undefined; -- 2.51.2