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

Add BlueSky Posting Support #4

merged opened by stevedylan.dev targeting main from feat/bsky-post-ref

Overview#

Adds a new config option that allows users to enable posting to BlueSky every time a new document is published. This uses the bskyPostRef field from site.standard.document.

Config Updates#

Example generated config with Bluesky enabled:

{
    "siteUrl": "https://example.com",
    "contentDir": "./content",
    "publicationUri": "at://did:plc:.../...",
    "bluesky": {
      "enabled": true,
      "maxAgeDays": 30
    }
  }
  • bluesky.enabled will determine if BlueSky posts will be created when a new document is published. If true, the document will be created first, then a BlueSky post will be made with the title, description, and the canonicalUrl of the post. If there is an image it will embed it into the post as well. All of the combined fields are limited to 300 characters.
  • bluesky.maxAgeDays determines how far back the user may want to create BlueSky posts. For example, if I have 40 blog posts and I'm using Sequoia for the first time, the last thing I want to do is publish all 40 blog posts on my feed and cause noise. This setting lets a user determine how far back they want to post for.

When sequoia publish --dry-run is used the CLI will print out which posts will be published to BlueSky, and which ones will not.

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:ia2zdnhjaokf5lazhxrmj6eu/sh.tangled.repo.pull/3mdr5eranql22
+26 -2
Interdiff #0 โ†’ #1
docs/docs/pages/blog/introducing-sequoia.mdx

This file has not been changed.

packages/cli/src/commands/init.ts

This file has not been changed.

packages/cli/src/commands/publish.ts

This file has not been changed.

packages/cli/src/lib/atproto.ts

This file has not been changed.

packages/cli/src/lib/config.ts

This file has not been changed.

packages/cli/src/lib/types.ts

This file has not been changed.

+8 -1
docs/docs/pages/config.mdx
··· 15 15 | `identity` | `string` | No | - | Which stored identity to use | 16 16 | `frontmatter` | `object` | No | - | Custom frontmatter field mappings | 17 17 | `ignore` | `string[]` | No | - | Glob patterns for files to ignore | 18 + | `bluesky` | `object` | No | - | Bluesky posting configuration | 19 + | `bluesky.enabled` | `boolean` | No | `false` | Post to Bluesky when publishing documents | 20 + | `bluesky.maxAgeDays` | `number` | No | `30` | Only post documents published within this many days | 18 21 19 22 ### Example 20 23 ··· 31 34 "frontmatter": { 32 35 "publishDate": "date" 33 36 }, 34 - "ignore": ["_index.md"] 37 + "ignore": ["_index.md"], 38 + "bluesky": { 39 + "enabled": true, 40 + "maxAgeDays": 30 41 + } 35 42 } 36 43 ``` 37 44
+18 -1
docs/docs/pages/publishing.mdx
··· 10 10 sequoia publish --dry-run 11 11 ``` 12 12 13 - This will print out the posts that it has discovered, what will be published, and how many. Once everything looks good, send it! 13 + This will print out the posts that it has discovered, what will be published, and how many. If Bluesky posting is enabled, it will also show which posts will be shared to Bluesky. Once everything looks good, send it! 14 14 15 15 ```bash [Terminal] 16 16 sequoia publish ··· 27 27 ``` 28 28 29 29 Sync will use your ATProto handle to look through all of the `standard.site.document` records on your PDS, and pull down the records that are for the publication in the config. 30 + 31 + ## Bluesky Posting 32 + 33 + Sequoia can automatically post to Bluesky when new documents are published. Enable this in your config: 34 + 35 + ```json 36 + { 37 + "bluesky": { 38 + "enabled": true, 39 + "maxAgeDays": 30 40 + } 41 + } 42 + ``` 43 + 44 + When enabled, each new document will create a Bluesky post with the title, description, and canonical URL. If a cover image exists, it will be embedded in the post. The combined content is limited to 300 characters. 45 + 46 + The `maxAgeDays` setting prevents flooding your feed when first setting up Sequoia. For example, if you have 40 existing blog posts, only those published within the last 30 days will be posted to Bluesky. 30 47 31 48 ## Troubleshooting 32 49

History

2 rounds 0 comments
sign up or login to add to the discussion
3 commits
expand
chore: adjust blog post
feat: added bskyPostRef
chore: updated docs
expand 0 comments
pull request successfully merged
2 commits
expand
chore: adjust blog post
feat: added bskyPostRef
expand 0 comments