A CLI for publishing standard.site documents to ATProto

fix: add a initial date

+8 -1
+7 -1
packages/cli/src/commands/publish.ts
··· 234 234 } 235 235 } 236 236 237 - log.message(` ${icon} ${post.frontmatter.title} (${reason})${bskyNote}`); 237 + log.message(` ${icon} ${post.filePath} (${reason})${bskyNote}`); 238 238 } 239 239 240 240 if (dryRun) { ··· 280 280 281 281 for (const { post, action } of postsToPublish) { 282 282 s.start(`Publishing: ${post.frontmatter.title}`); 283 + 284 + // Init publish date 285 + if (!post.frontmatter.publishDate) { 286 + const [publishDate] = new Date().toISOString().split("T") 287 + post.frontmatter.publishDate = publishDate! 288 + } 283 289 284 290 try { 285 291 // Handle cover image upload
+1
packages/cli/src/lib/atproto.ts
··· 299 299 300 300 const pathPrefix = config.pathPrefix || "/posts"; 301 301 const postPath = `${pathPrefix}/${post.slug}`; 302 + 302 303 const publishDate = new Date(post.frontmatter.publishDate); 303 304 const textContent = getTextContent(post, config.textContentField); 304 305