tangled
alpha
login
or
join now
apoena.dev
/
sequoia
forked from
stevedylan.dev/sequoia
A CLI for publishing standard.site documents to ATProto
0
fork
atom
overview
issues
pulls
pipelines
fix: add a initial date
Julien Calixte
19 hours ago
709725bd
5b313d8b
0/1
lint.yml
failed
5s
+8
-1
2 changed files
expand all
collapse all
unified
split
packages
cli
src
commands
publish.ts
lib
atproto.ts
+7
-1
packages/cli/src/commands/publish.ts
···
234
234
}
235
235
}
236
236
237
237
-
log.message(` ${icon} ${post.frontmatter.title} (${reason})${bskyNote}`);
237
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
283
+
284
284
+
// Init publish date
285
285
+
if (!post.frontmatter.publishDate) {
286
286
+
const [publishDate] = new Date().toISOString().split("T")
287
287
+
post.frontmatter.publishDate = publishDate!
288
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
+
302
303
const publishDate = new Date(post.frontmatter.publishDate);
303
304
const textContent = getTextContent(post, config.textContentField);
304
305