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

feat: add option to disable publishing (text) content #40

merged opened by willow.sh targeting main from willow.sh/sequoia: disable-text-content

Adds an option to disable publishing the text content since it may not be desired - defaults to true since that's the current behavior.

PR is dependent on #39 because of the json schema changes, so maybe best to look at that first

Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:dfkjiu36xs6ogt7pux7i7o2b/sh.tangled.repo.pull/3mgemcc6tsb22
+14 -12
Interdiff #0 โ†’ #1
docs/docs/pages/config.mdx

This file has not been changed.

docs/sequoia.json

This file has not been changed.

docs/src/lib/ConfigTable.tsx

This file has not been changed.

packages/cli/package.json

This file has not been changed.

+6 -5
packages/cli/src/commands/init.ts
··· 98 98 message: "URL path prefix for posts:", 99 99 placeholder: "/posts, /blog, /articles, etc.", 100 100 }), 101 - publishContent: () => confirm({ 102 - message: 'Publish the post content on the standard.site document?', 103 - initialValue: true 104 - }) 101 + publishContent: () => 102 + confirm({ 103 + message: "Publish the post content on the standard.site document?", 104 + initialValue: true, 105 + }), 105 106 }, 106 107 { onCancel }, 107 108 ); ··· 345 346 pdsUrl, 346 347 frontmatter: frontmatterMapping, 347 348 bluesky: blueskyConfig, 348 - publishContent: siteConfig.publishContent 349 + publishContent: siteConfig.publishContent, 349 350 }); 350 351 351 352 const configPath = path.join(process.cwd(), "sequoia.json");
+5 -5
packages/cli/src/commands/update.ts
··· 376 376 377 377 const publishContent = exitOnCancel( 378 378 await confirm({ 379 - message: 'Publish the post content on the standard.site document?', 380 - initialValue: config.publishContent ?? true 381 - }) 382 - ) 379 + message: "Publish the post content on the standard.site document?", 380 + initialValue: config.publishContent ?? true, 381 + }), 382 + ); 383 383 384 384 const textContentField = exitOnCancel( 385 385 await text({ ··· 405 405 removeIndexFromSlug: removeIndexFromSlug || undefined, 406 406 stripDatePrefix: stripDatePrefix || undefined, 407 407 textContentField: textContentField || undefined, 408 - publishContent: publishContent ?? true 408 + publishContent: publishContent ?? true, 409 409 }; 410 410 } 411 411
packages/cli/src/lib/atproto.ts

This file has not been changed.

+3 -2
packages/cli/src/lib/config.ts
··· 89 89 bluesky?: BlueskyConfig; 90 90 }): string { 91 91 const config: Record<string, unknown> = { 92 - $schema: 'https://tangled.org/stevedylan.dev/sequoia/raw/main/sequoia.schema.json', 92 + $schema: 93 + "https://tangled.org/stevedylan.dev/sequoia/raw/main/sequoia.schema.json", 93 94 siteUrl: options.siteUrl, 94 95 contentDir: options.contentDir, 95 96 }; ··· 141 142 } 142 143 143 144 if (options.publishContent) { 144 - config.publishContent = options.publishContent 145 + config.publishContent = options.publishContent; 145 146 } 146 147 147 148 if (options.bluesky) {
packages/cli/src/lib/types.ts

This file has not been changed.

sequoia.schema.json

This file has not been changed.

History

3 rounds 5 comments
sign up or login to add to the discussion
1 commit
expand
feat: add option to disable publishing (text) content
expand 2 comments

@stevedylan.dev merged conflicts fixed - the only issue I can foresee is that the diff checking system when you publish isn't aware of this field. We could fix that or I could open a PR that makes the diff system "simpler" by essentially building the site.standard.document for each post and then comparing that with the published site.standard.document for the post to see if there is a difference. That way it should catch any changes that it's currently missing. WDYT?

Good catch! I think a separate PR with your solution would work great. Will go ahead and merge this!

pull request successfully merged
2 commits
expand
feat: add json schema
feat: add option to disable publishing (text) content
expand 1 comment

Iโ€™ve had the in the back of my head; thank you for carrying it out! For some reason Tangled is saying there is some merge conflicts due to the last PR, so happy to merge once it gets cleared up!

2 commits
expand
feat: add json schema
feat: add option to disable publishing (text) content
expand 2 comments