A CLI for publishing standard.site documents to ATProto sequoia.pub
standard site lexicon cli publishing

Print rendered site post URL behind --verbose #21

merged opened by heaths.dev targeting main from heaths.dev/sequoia: issue8

Added a --verbose flag to publish that shows the post URL. Unfortunately, the resolved source path may not be the rended page path, but at least the CLI will show it now.

Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:tg3tb5wukiml4xmxml6qm637/sh.tangled.repo.pull/3medpgpr36k22
+11 -2
Diff #0
+11 -2
packages/cli/src/commands/publish.ts
··· 40 40 short: "n", 41 41 description: "Preview what would be published without making changes", 42 42 }), 43 + verbose: flag({ 44 + long: "verbose", 45 + short: "v", 46 + description: "Show more information", 47 + }) 43 48 }, 44 - handler: async ({ force, dryRun }) => { 49 + handler: async ({ force, dryRun, verbose }) => { 45 50 // Load config 46 51 const configPath = await findConfig(); 47 52 if (!configPath) { ··· 233 238 } 234 239 } 235 240 236 - log.message(` ${icon} ${post.frontmatter.title} (${reason})${bskyNote}`); 241 + let postUrl = ""; 242 + if (verbose) { 243 + postUrl = `\n ${config.siteUrl}/${relativeFilePath}`; 244 + } 245 + log.message(` ${icon} ${post.frontmatter.title} (${reason})${bskyNote}${postUrl}`); 237 246 } 238 247 239 248 if (dryRun) {

History

1 round 4 comments
sign up or login to add to the discussion
heaths.dev submitted #0
1 commit
expand
Print rendered site post URL behind --verbose
expand 4 comments

Note: I originally just printed another log.message but the blank line separating the "caption" just looked odd, so I figured I'd sandwich them a little more. So now you see 2 lines, blank, 2 lines, etc.

This is great! I think we might need to update what we are using for the postUrl value though. It's a bit more involved, this should do the trick:

	const pathPrefix = config.pathPrefix || "/posts";
	postUrl = `\n ${config.siteUrl}${pathPrefix}/${post.slug}`;

I might make config.pathPrefix a required field in the near future, don't like the manual /posts I have right now.

Looks a little better, but still not the right path e.g.,

+ Publishing to the ATmosphere (new post) [bsky: will post]
  https://heaths.dev/posts/2026-02-08-publishing-to-the-atmosphere

@heaths.dev I think that looks correct based on how Sequoia currently works. We still need to make a solution for issue #9, this at least completes issue #8.

pull request successfully merged