this repo has no description

fix: add a initial date

authored by

Julien Calixte and committed by
Julien Calixte
f1fcd005 df1dccfb

+7 -1
+7 -1
packages/cli/src/commands/publish.ts
··· 250 250 postUrl = `\n ${config.siteUrl}${postPath}`; 251 251 } 252 252 log.message( 253 - ` ${icon} ${post.frontmatter.title} (${reason})${bskyNote}${postUrl}`, 253 + ` ${icon} ${post.filePath} (${reason})${bskyNote}${postUrl}`, 254 254 ); 255 255 } 256 256 ··· 297 297 298 298 for (const { post, action } of postsToPublish) { 299 299 s.start(`Publishing: ${post.frontmatter.title}`); 300 + 301 + // Init publish date 302 + if (!post.frontmatter.publishDate) { 303 + const [publishDate] = new Date().toISOString().split("T") 304 + post.frontmatter.publishDate = publishDate! 305 + } 300 306 301 307 try { 302 308 // Handle cover image upload