~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

The documentation site is the private repository's, deployed by its owner

Merged chadtmiller.com asked to merge into main from chadtmiller.com/monolith:docs/private-site
.knotless/workflows/docs.yml+3−8
@@ -3,9 +3,9 @@
# lexicons and the spec's tables. Its build fails on a link to a file or
# heading that is not there, a method spec/PDS.md lists under no page, or
# a variable the spec names in no table of them, so a pull that breaks one
# is caught. On a push to main it is deployed as the repository's site, at
# https://chadtmiller-com.knotless.page/spec-pds/, logged in with the
# owner's app password in SITE_PASSWORD, which no pull is given.
# is caught. `just docs-deploy` deploys it, from the owner's machine: the
# site of a private repository is kept in its space, which an app
# password, all a run could sign in with, cannot write.
image: node:24.22.1
runners: [runner.knotless.dev]
# The two lists are the same; keep them so.
@@ -16,14 +16,9 @@ on:
pull:
base: [refs/heads/main]
paths: [docs/**, spec/*.md, spec/lexicons/**, compat/*.md, bench/*.md, docs-site/**, web/src/tokens.css, .knotless/workflows/docs.yml, .knotless/uses.lock]
secrets: [SITE_PASSWORD]
cache: [docs-site/node_modules]
steps:
- uses: chadtmiller.com/steps/npm-ci@1
with: {dir: docs-site}
- name: build
run: cd docs-site && npm run build
- uses: chadtmiller.com/steps/site@1
on: {refs: [refs/heads/main]}
with: {dir: docs-site/dist}
secrets: [SITE_PASSWORD]
.knotless/uses.lock+0−4
@@ -7,7 +7,3 @@ chadtmiller.com/steps/npm-ci@1:
version: 1.0.0
commit: 686cdbb38978730bb1ba5d1c999967e48497ce15
release: at://did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.release/3mza7iq7tundv.dzyz2ceqihhxzgk2f2637ygpfw.sjjb7q6l3fsl3spvqsuzdoe73w
chadtmiller.com/steps/site@1:
version: 1.0.0
commit: c09eceeb5cb08db27056ebe6e11a533baf716839
release: at://did:plc:bcgltzqazw5tb6k2g3ttenbj/dev.knotless.release/3mza7iq7tundv.j72zsnw3q3ykgliyoih74ixcru.sjjb7q6l3fsl3spvqsuzdoe73w
docs/guide/contributing.md+27−0
@@ -18,6 +18,8 @@ just gates # the code gates, the tests and the harness runs
just nightly # the long crash runs, then the performance step
just look consent # an authorization page drawn, desktop light and phone dark, in target/look
just dev --seed # a server to try by hand (Getting started)
just docs-site # the documentation site, served while you write (below)
just docs-deploy # the documentation site, deployed by its owner (below)
```
While you work, run `just quick` alone. Push the branch and open the pull
@@ -86,6 +88,31 @@ pictures in `target/look` to open:
just look consent --scope 'atproto repo:*'
```
## The documentation site
`docs-site/` builds the site from these guides, the spec's pages, the
lexicons, and `compat/` and `bench/`:
```sh
cd docs-site && npm ci && npm run build
```
The build fails on a link to a file or heading that is not there, a method
`spec/PDS.md` lists under no page, or a variable the spec names in no table
of them; the `docs` workflow builds it on each pull that changes what it is
made from. `just docs-site` serves it at http://localhost:4321/ while you
write.
The repository is private, so its site is too: only its members read it,
at https://3mztgvkwexivt-bcgltzqazw5tb6k2g3ttenbj.private.knotless.page/.
An app password, all a workflow could sign in with, cannot write the space
its site is kept in, so the owner deploys it, signed in with `knotless
login`:
```sh
just docs-deploy
```
## Releases
A release is `main` with the workspace's `version` raised, tagged
docs-site/astro.config.mjs+2−2
@@ -45,8 +45,8 @@ function specLabel(area, name) {
const specItem = (area) => (name) => ({ label: specLabel(area, name), slug: slugOf(`spec/${name}.md`) })
export default defineConfig({
site: 'https://chadtmiller-com.knotless.page',
base: BASE,
site: 'https://3mztgvkwexivt-bcgltzqazw5tb6k2g3ttenbj.private.knotless.page',
base: BASE || '/',
markdown: {
processor: unified({ remarkPlugins: [remarkLinks] }),
},
docs-site/content.mjs+2−2
@@ -16,8 +16,8 @@ const here = dirname(fileURLToPath(import.meta.url))
export const root = join(here, '..')
const out = join(here, 'src/content/docs')
/** Where the site is served, and the repository it is made from. */
export const BASE = '/spec-pds'
/** Where the site is served: the root of the repository's private host. */
export const BASE = ''
export const REPO = 'https://knotless.dev/chadtmiller.com/spec-pds'
const read = (path) => readFileSync(join(root, path), 'utf8')
AGENTS.md+3−2
@@ -79,8 +79,9 @@ sessions in it, in `docs/`, or in the spec.
- The documentation site: `cd docs-site && npm ci` once, then `npm run
build`, which fails on a link to a file or heading that is not there, a
method `spec/PDS.md` lists under no page, or a variable the spec names in
no table of them; `npm run dev` serves it while writing. The `docs`
workflow builds it on each pull, and deploys it from `main`.
no table of them; `just docs-site` serves it while writing. The `docs`
workflow builds it on each pull; its owner deploys it with `just
docs-deploy`.
- The spaces run (`harness/spaces/compare.mjs`, `spec/SPACES.md`) checks the
server against the pinned spaces alpha of the reference, with its own
packages: `cd harness/spaces && npm ci` once; `pin-alpha.sh` re-pins it.
Justfile+9−0
@@ -29,6 +29,15 @@ look *args: build
dev *args: build
cd harness && node dev.mjs "$@"
# The documentation site (docs-site/), at http://localhost:4321/, drawn again as its pages change.
docs-site:
cd docs-site && npm ci --no-audit --no-fund && npm run dev
# The documentation site, built and deployed as the repository's, for its members: run by its owner, signed in with `knotless login`, as an app password, all a workflow could sign in with, cannot write the space a private repository's site is kept in.
docs-deploy:
cd docs-site && npm ci --no-audit --no-fund && npm run build
knotless repo site knotless://chadtmiller.com/spec-pds docs-site/dist --not-found 404.html
# The source: cargo fmt, clippy with warnings denied, cargo deny, and #![forbid(unsafe_code)] in every crate; the pages' layers, contrast and svelte-check.
code: web
cd harness && CARGO="{{cargo}}" node gates.mjs code
README.md+4−2
@@ -33,8 +33,10 @@ versions.
## Documentation
The documentation is at https://chadtmiller-com.knotless.page/spec-pds/,
built from [`docs/`](docs/README.md) and the spec. The guides:
The documentation is at
https://3mztgvkwexivt-bcgltzqazw5tb6k2g3ttenbj.private.knotless.page/, for
the repository's members, built from [`docs/`](docs/README.md) and the
spec. The guides:
- [Getting started](docs/guide/getting-started.md): build it and run a server to try.
- [Calling the server](docs/guide/calling.md): XRPC, the `pds` CLI and the MCP endpoint.