feat: standard.site publisher for blog records#5
Merged
Conversation
Publish the blog to the standard.site AT Protocol lexicons: one site.standard.publication record and one site.standard.document record per non-hidden post (rkey = slug), written to a Bluesky/PDS account during the build. - standard-site/atproto.ts: minimal XRPC client (createSession/putRecord/ listRecords/deleteRecord), validate:false for third-party lexicons, no deps - standard-site/publish.ts: config-driven, opt-in (no-op unless configured), idempotent upsert + prune of stale documents, dry-run mode - build.ts: publish after the blog build (skipped when unconfigured) - STANDARD-SITE.md + .env.example: setup and config docs Publication-agnostic so the shared submodule can serve multiple sites; each consumer supplies its own env/secrets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a standard.site (AT Protocol) publisher to the shared build. During
npm run buildit upserts:site.standard.publicationrecord (rkeyself) for the blogsite.standard.documentrecord per non-hidden post (rkey = slug)to the configured Bluesky/PDS account, and prunes records for removed/hidden posts.
Design
standard-site/atproto.ts— minimal XRPC client (createSession/putRecord/listRecords/deleteRecord). No new deps (globalfetch).validate: falsebecause a PDS doesn't natively know third-party lexicons likesite.standard.*.standard-site/publish.ts— fully config-driven (all account/publication values from env) and opt-in: ifBSKY_APP_PASSWORD/BSKY_HANDLE/STANDARD_SITE_URLaren't set, it's a no-op. Idempotent (stable rkeys → re-runs update in place), prunes stale documents, and supportsSTANDARD_SITE_DRY_RUN=truefor a preview.build.ts— calls the publisher after the blog build.stripHtmlTags/extractFirstBigParagraph/ hidden-filter.Publication-agnostic on purpose: this submodule is shared (angular.schule now, angular-buch.com later). Each consuming repo supplies its own env/secrets — no submodule change needed to onboard another site.
Verification
npm run typecheckclean.bsky.social.Docs:
STANDARD-SITE.md(setup + config keys),.env.example.