From fd3d1e525d5c2d727d3e2204b0e4836ec9fb949f Mon Sep 17 00:00:00 2001 From: Trezy Date: Thu, 2 Jul 2026 12:37:29 -0500 Subject: [PATCH] docs: add standard.site publishing to the blog Signed-off-by: Trezy --- packages/docs/.gitignore | 3 +++ packages/docs/content/blog/happyview-2.10.md | 1 + packages/docs/content/blog/happyview-2.5.md | 1 + .../content/blog/happyview-2.6-and-2.7.md | 1 + packages/docs/content/blog/happyview-2.8.md | 1 + packages/docs/content/blog/happyview-2.9.md | 1 + .../releasing-happyview-2-into-the-wild.md | 1 + packages/docs/package.json | 4 +++- packages/docs/public/.well-known/.gitkeep | 0 .../.well-known/site.standard.publication | 1 + packages/docs/scripts/sequoia-publish.mjs | 21 +++++++++++++++++++ packages/docs/sequoia.json | 21 +++++++++++++++++++ packages/docs/source.config.ts | 1 + packages/docs/src/app/blog/[slug]/page.tsx | 10 ++++++++- packages/docs/src/lib/sequoia.ts | 20 ++++++++++++++++++ 15 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 packages/docs/public/.well-known/.gitkeep create mode 100644 packages/docs/public/.well-known/site.standard.publication create mode 100644 packages/docs/scripts/sequoia-publish.mjs create mode 100644 packages/docs/sequoia.json create mode 100644 packages/docs/src/lib/sequoia.ts diff --git a/packages/docs/.gitignore b/packages/docs/.gitignore index ea46b1f..5bff724 100644 --- a/packages/docs/.gitignore +++ b/packages/docs/.gitignore @@ -3,6 +3,9 @@ .next .source +# Sequoia publish state (regenerated during build) +.sequoia-state.json + # Generated changelogs (built from GitHub releases) content/docs/reference/changelog.md content/docs/sdk/**/changelog.md diff --git a/packages/docs/content/blog/happyview-2.10.md b/packages/docs/content/blog/happyview-2.10.md index 9201751..c2f0c5e 100644 --- a/packages/docs/content/blog/happyview-2.10.md +++ b/packages/docs/content/blog/happyview-2.10.md @@ -7,6 +7,7 @@ author: avatar: "/authors/trezy.webp" tags: - announcements +atUri: "at://did:plc:qneu5uamqs6cug7sjobbaexm/site.standard.document/3mpokm36ivd2d" --- This one's been a long time coming. HappyView finally has a real AT Protocol identity, can do service proxying, and permissioned spaces got a big update to match the official spec. diff --git a/packages/docs/content/blog/happyview-2.5.md b/packages/docs/content/blog/happyview-2.5.md index bfdacae..1cf00d4 100644 --- a/packages/docs/content/blog/happyview-2.5.md +++ b/packages/docs/content/blog/happyview-2.5.md @@ -7,6 +7,7 @@ author: avatar: "/authors/trezy.webp" tags: - announcements +atUri: "at://did:plc:qneu5uamqs6cug7sjobbaexm/site.standard.document/3mpokm3iq232d" --- HappyView 2.5 is out, and it ships with one of the most anticipated features in the [atproto](https://atproto.com) ecosystem: diff --git a/packages/docs/content/blog/happyview-2.6-and-2.7.md b/packages/docs/content/blog/happyview-2.6-and-2.7.md index 56433f8..138ec26 100644 --- a/packages/docs/content/blog/happyview-2.6-and-2.7.md +++ b/packages/docs/content/blog/happyview-2.6-and-2.7.md @@ -7,6 +7,7 @@ author: avatar: "/authors/trezy.webp" tags: - announcements +atUri: "at://did:plc:qneu5uamqs6cug7sjobbaexm/site.standard.document/3mpokm3g6zm22" --- Two releases in two days. v2.6, followed closely by v2.7. Neither one has a single marquee feature like [Permissioned Spaces](/blog/happyview-2.5), but together they make the whole system noticeably more solid. diff --git a/packages/docs/content/blog/happyview-2.8.md b/packages/docs/content/blog/happyview-2.8.md index c09f49c..84652f5 100644 --- a/packages/docs/content/blog/happyview-2.8.md +++ b/packages/docs/content/blog/happyview-2.8.md @@ -7,6 +7,7 @@ author: avatar: "/authors/trezy.webp" tags: - announcements +atUri: "at://did:plc:qneu5uamqs6cug7sjobbaexm/site.standard.document/3mpokm3dl4t2j" --- v2.8 is mostly bug fixes, but Backfills did get a serious overhaul. The permissions page was also rebuilt to be much more useful, and the docs site has a whole new look. diff --git a/packages/docs/content/blog/happyview-2.9.md b/packages/docs/content/blog/happyview-2.9.md index 2195b49..46860ae 100644 --- a/packages/docs/content/blog/happyview-2.9.md +++ b/packages/docs/content/blog/happyview-2.9.md @@ -7,6 +7,7 @@ author: avatar: "/authors/trezy.webp" tags: - announcements +atUri: "at://did:plc:qneu5uamqs6cug7sjobbaexm/site.standard.document/3mpokm3b2ua2c" --- 2.9 is a big one. Scripts got an overhaul, backfill got way faster, and there's a mountain of bug fixes and performance improvements across the board. diff --git a/packages/docs/content/blog/releasing-happyview-2-into-the-wild.md b/packages/docs/content/blog/releasing-happyview-2-into-the-wild.md index 729ca0c..a6c0436 100644 --- a/packages/docs/content/blog/releasing-happyview-2-into-the-wild.md +++ b/packages/docs/content/blog/releasing-happyview-2-into-the-wild.md @@ -7,6 +7,7 @@ author: avatar: "/authors/trezy.webp" tags: - announcements +atUri: "at://did:plc:qneu5uamqs6cug7sjobbaexm/site.standard.document/3mpokm3ld5m2v" --- I originally built HappyView because I needed it for my own [atproto](https://atproto.com) project, [Cartridge](https://cartridge.dev). v2 is still built for my needs, but now I can hand it to someone else without apologizing. diff --git a/packages/docs/package.json b/packages/docs/package.json index e035f81..48c28ea 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -5,7 +5,8 @@ "scripts": { "dev": "next dev --turbopack", "generate-changelogs": "node scripts/generate-changelogs.mjs", - "build": "npm run generate-changelogs && next build", + "sequoia:publish": "node scripts/sequoia-publish.mjs", + "build": "npm run generate-changelogs && npm run sequoia:publish && next build", "start": "next start" }, "dependencies": { @@ -29,6 +30,7 @@ "devDependencies": { "@types/node": "^22.0.0", "@types/react": "^19.0.0", + "sequoia-cli": "^0.5.7", "typescript": "^5.7.0" } } diff --git a/packages/docs/public/.well-known/.gitkeep b/packages/docs/public/.well-known/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/packages/docs/public/.well-known/site.standard.publication b/packages/docs/public/.well-known/site.standard.publication new file mode 100644 index 0000000..fcb19e7 --- /dev/null +++ b/packages/docs/public/.well-known/site.standard.publication @@ -0,0 +1 @@ +at://did:plc:qneu5uamqs6cug7sjobbaexm/site.standard.publication/3mpokbucn3y26 \ No newline at end of file diff --git a/packages/docs/scripts/sequoia-publish.mjs b/packages/docs/scripts/sequoia-publish.mjs new file mode 100644 index 0000000..2547284 --- /dev/null +++ b/packages/docs/scripts/sequoia-publish.mjs @@ -0,0 +1,21 @@ +import { execSync } from 'node:child_process'; +import { readFileSync } from 'node:fs'; + +const config = JSON.parse(readFileSync(new URL('../sequoia.json', import.meta.url), 'utf-8')); + +if (!config.publicationUri) { + console.log('[sequoia] No publicationUri configured — run `sequoia init` to set up. Skipping publish.'); + process.exit(0); +} + +if (!process.env.ATP_IDENTIFIER && !process.env.ATP_APP_PASSWORD) { + console.log('[sequoia] No ATP_IDENTIFIER/ATP_APP_PASSWORD set — skipping publish.'); + process.exit(0); +} + +try { + execSync('sequoia publish', { stdio: 'inherit', cwd: new URL('..', import.meta.url).pathname }); +} catch (err) { + console.error('[sequoia] Publish failed:', err.message); + console.error('[sequoia] Continuing build without publishing.'); +} diff --git a/packages/docs/sequoia.json b/packages/docs/sequoia.json new file mode 100644 index 0000000..95b77e4 --- /dev/null +++ b/packages/docs/sequoia.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://sequoia.pub/schema.json", + "siteUrl": "https://happyview.dev", + "pathPrefix": "/blog", + "contentDir": "./content/blog", + "imagesDir": "./public", + "outputDir": "./.next", + "publicDir": "./public", + "publicationUri": "at://did:plc:qneu5uamqs6cug7sjobbaexm/site.standard.publication/3mpokbucn3y26", + "frontmatter": { + "publishDate": "date", + "title": "title", + "description": "description", + "tags": "tags" + }, + "bluesky": { + "enabled": true + }, + "autoSync": true, + "publishContent": true +} diff --git a/packages/docs/source.config.ts b/packages/docs/source.config.ts index 720c16d..7a12b21 100644 --- a/packages/docs/source.config.ts +++ b/packages/docs/source.config.ts @@ -119,6 +119,7 @@ export const blog = defineDocs({ avatar: z.string(), }), tags: z.array(z.string()).optional().default([]), + atUri: z.string().optional(), }), }, }); diff --git a/packages/docs/src/app/blog/[slug]/page.tsx b/packages/docs/src/app/blog/[slug]/page.tsx index ee2dbd3..327da97 100644 --- a/packages/docs/src/app/blog/[slug]/page.tsx +++ b/packages/docs/src/app/blog/[slug]/page.tsx @@ -3,6 +3,7 @@ import { notFound } from 'next/navigation'; import defaultMdxComponents from 'fumadocs-ui/mdx'; import { Mermaid } from '@/components/mermaid'; import { VaporwaveGrid } from '@/components/vaporwave-grid'; +import { getSequoiaPublicationUri } from '@/lib/sequoia'; import Image from 'next/image'; export default async function BlogPost(props: { @@ -13,11 +14,18 @@ export default async function BlogPost(props: { if (!page) notFound(); - const { title, description, date, author, tags } = page.data; + const { title, description, date, author, tags, atUri } = page.data; const Mdx = page.data.body; + const publicationUri = getSequoiaPublicationUri(); return (
+ {publicationUri && ( + + )} + {atUri && ( + + )}

{title}

{description && ( diff --git a/packages/docs/src/lib/sequoia.ts b/packages/docs/src/lib/sequoia.ts new file mode 100644 index 0000000..c64549d --- /dev/null +++ b/packages/docs/src/lib/sequoia.ts @@ -0,0 +1,20 @@ +import { readFileSync } from 'node:fs'; +import { resolve } from 'node:path'; + +let cachedUri: string | undefined; +let loaded = false; + +export function getSequoiaPublicationUri(): string | undefined { + if (loaded) return cachedUri; + loaded = true; + + try { + const configPath = resolve(process.cwd(), 'sequoia.json'); + const config = JSON.parse(readFileSync(configPath, 'utf-8')); + cachedUri = config.publicationUri || undefined; + } catch { + cachedUri = undefined; + } + + return cachedUri; +} -- 2.51.2