diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 030712a..418937e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -131,8 +131,14 @@ jobs: *) echo "::error::Invalid smoke-test target"; exit 1 ;; esac - curl --fail --silent --show-error "$URL/" >/dev/null - curl --fail --silent --show-error --location "$URL/docs" >/dev/null + root="$(curl --silent --show-error --output /dev/null --write-out '%{http_code} %{redirect_url}' "$URL/")" + test "$root" = "302 $URL/docs/assay" + docs="$(curl --silent --show-error --output /dev/null --write-out '%{http_code} %{redirect_url}' "$URL/docs")" + test "$docs" = "302 $URL/docs/assay" + landing="$(curl --fail --silent --show-error --location --max-redirs 1 --output /dev/null --write-out '%{http_code} %{num_redirects} %{url_effective}' "$URL/")" + test "$landing" = "200 1 $URL/docs/assay" + curl --fail --silent --show-error "$URL/docs/assay" >/dev/null + curl --fail --silent --show-error "$URL/docs/throughline" >/dev/null curl --fail --silent --show-error "$URL/llms.txt" >/dev/null curl --fail --silent --show-error "$URL/llms-full.txt" >/dev/null curl --fail --silent --show-error "$URL/robots.txt" >/dev/null diff --git a/README.md b/README.md index 2da917c..5d92d02 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,9 @@ Fumadocs owns the documentation navigation. The repository is organized by tool, ```text content/docs/ ├── meta.json # Shared tool order +├── assay/ # Default product +│ ├── meta.json +│ └── index.mdx ├── throughline/ │ ├── meta.json # Throughline navigation │ ├── index.mdx # Tool overview @@ -19,7 +22,7 @@ content/docs/ └── *.mdx ``` -- The root `content/docs/meta.json` lists Throughline first and uses Fumadocs' `"..."` entry to include future tools automatically. +- The root `content/docs/meta.json` lists Assay first, then Throughline and uses Fumadocs' `"..."` entry to include future tools automatically. - Give every tool its own `content/docs//` directory with an `index.mdx` and `meta.json`. Set `"root": true` in the tool's metadata so its navigation is separate from other tools. Give it a clear title, a short description, and an explicit `pages` order. Section separators such as `"---Reference---"` group related pages without changing URLs. - Use stable filenames: Fumadocs derives each public address from its MDX path. Navigation changes must not unnecessarily change existing addresses. - New tools also need a published product entry in the R2 catalog, with no outbound `url`, before they appear on the public site. Content files alone do not publish a product. @@ -37,7 +40,7 @@ The showcase is deliberately limited to a few pages and does not automatically t The private `0xbuffdev/content` repository owns the product records and publishes them to independent 0xBUFF buckets via its validated content pipeline. Documentation reads `manifest.json` and the referenced `products/manifest.json` through its Worker `CONTENT` R2 binding and validates them with `@0xbuffdev/content-contract@0.1.0` (imported as `@0xbuff/content-contract`). -Only published product records with **no outbound `url`** and a matching `content/docs//index.mdx` are listed. The R2 catalog controls the homepage, documentation routes, sidebar, sitemap, search index and LLM exports. The MDX articles themselves are compiled from this repository and require a documentation deployment to update. Catalog changes appear after the 60-second edge cache expires; no documentation rebuild is needed for catalog changes alone. +Only published product records with **no outbound `url`** and a matching `content/docs//index.mdx` are listed. The R2 catalog controls documentation routes, sidebar, sitemap, search index and LLM exports. Both `/` and `/docs` temporarily redirect directly to `/docs/assay` in one hop, only when Assay is published. Missing Assay returns 503 rather than falling back to another tool. Publish the Assay catalog record to each target R2 bucket before deploying this change. The MDX articles themselves are compiled from this repository and require a documentation deployment to update. Catalog changes appear after the 60-second edge cache expires; no documentation rebuild is needed for catalog changes alone. The two production-facing buckets are **not interchangeable**: @@ -102,7 +105,7 @@ Pull requests continue to typecheck, test, build **both** target configurations, Cloudflare deployment requires repository secrets `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID` with the minimum permissions for Workers and the configured custom domains. Newsletter `RESEND_API_KEY` is a **Worker secret**, set independently for the production and staging Workers. The staging `RESEND_SEGMENT_ID` is intentionally empty to prevent accidental subscriptions to the production audience; configure a separate staging segment before testing signup delivery. -Before either deployment, independently confirm the relevant R2 bucket exists, contains a valid `manifest.json` and `products/manifest.json`, is accessible to that Worker's `CONTENT` binding, and that Cloudflare domains and credentials are provisioned. CI cannot create or verify those Cloudflare resources by reading the repository. The deployment smoke tests request the homepage and `/docs` to check real R2 access, plus the LLM, search, robots, sitemap and subscription routes. Staging serves `robots.txt` with `Disallow: /` and sets `X-Robots-Tag: noindex, nofollow, noarchive` on Worker responses. +Before either deployment, independently confirm the relevant R2 bucket exists, contains a valid `manifest.json` and `products/manifest.json`, is accessible to that Worker's `CONTENT` binding, and that Cloudflare domains and credentials are provisioned. CI cannot create or verify those Cloudflare resources by reading the repository. The deployment smoke tests verify both redirects and request `/docs/assay` to check real R2 access, plus the LLM, search, robots, sitemap and subscription routes. Staging serves `robots.txt` with `Disallow: /` and sets `X-Robots-Tag: noindex, nofollow, noarchive` on Worker responses. ## Bundle strategy diff --git a/content/docs/assay/index.mdx b/content/docs/assay/index.mdx new file mode 100644 index 0000000..e0deb46 --- /dev/null +++ b/content/docs/assay/index.mdx @@ -0,0 +1,10 @@ +--- +title: Assay +description: Compare technical evidence against explicit, versioned criteria. +--- + +Assay is a library for checking technical evidence against explicit criteria and producing reproducible findings. It runs offline and has no runtime dependencies. + +The host supplies evidence and authorizes the criteria. Assay does not execute submitted programs, authenticate observations, assign grades, or issue credentials. + +For the source, license, and release information, see the [Assay repository](https://github.com/0xbuffdev/assay). diff --git a/content/docs/assay/meta.json b/content/docs/assay/meta.json new file mode 100644 index 0000000..bd08fb3 --- /dev/null +++ b/content/docs/assay/meta.json @@ -0,0 +1,8 @@ +{ + "title": "Assay", + "description": "Compare technical evidence against explicit, versioned criteria.", + "root": true, + "pages": [ + "index" + ] +} diff --git a/content/docs/meta.json b/content/docs/meta.json index f937ab6..d9709af 100644 --- a/content/docs/meta.json +++ b/content/docs/meta.json @@ -2,6 +2,7 @@ "title": "0xBUFF Documentation", "description": "Guides, examples, and API references for 0xBUFF tools.", "pages": [ + "assay", "throughline", "..." ] diff --git a/scripts/docs-navigation.test.mjs b/scripts/docs-navigation.test.mjs index 478b518..e091090 100644 --- a/scripts/docs-navigation.test.mjs +++ b/scripts/docs-navigation.test.mjs @@ -20,7 +20,8 @@ test("global navigation lists the first tool and discovers future tools", async assert.equal(meta.title, "0xBUFF Documentation"); assert.ok(typeof meta.description === "string" && meta.description.trim()); assert.ok(Array.isArray(meta.pages)); - assert.equal(meta.pages[0], "throughline"); + assert.equal(meta.pages[0], "assay"); + assert.ok(meta.pages.includes("throughline")); assert.equal(meta.pages.at(-1), "...", "Fumadocs must include future tool folders"); assert.equal(new Set(meta.pages).size, meta.pages.length, "duplicate global entries"); for (const entry of meta.pages.filter((name) => name !== "...")) { diff --git a/src/components/not-found.tsx b/src/components/not-found.tsx index a364ebe..e09afb9 100644 --- a/src/components/not-found.tsx +++ b/src/components/not-found.tsx @@ -1,104 +1,24 @@ -import { Button } from "~/components/ui/button"; -import { cn } from "~/lib/utils"; -import { HomeLayout } from "fumadocs-ui/layouts/home"; import { Link } from "react-router"; -import { Crosshair, FrameCrosshairs } from "./crosshair"; -import { Footer } from "./footer"; -import { baseOptions } from "~/lib/layout.shared"; -import { ROUTES } from "~/lib/site"; +import { BrandWordmark } from "./brand-wordmark"; +import { ROUTES, SITE } from "~/lib/site"; export function NotFoundPage() { return ( - -
-
-
- {[ - "-left-6 -right-6 top-0 origin-center animate-line-x border-t sm:-left-10 sm:-right-10", - "-left-6 -right-6 bottom-0 origin-center animate-line-x border-b sm:-left-10 sm:-right-10", - "-top-6 -bottom-6 left-0 origin-top animate-line-y border-l sm:-top-8 sm:-bottom-8", - "-top-6 -bottom-6 right-0 origin-top animate-line-y border-r sm:-top-8 sm:-bottom-8", - ].map((position) => ( -
- ))} - {/* One crosshair at the center of each edge of the hero frame */} - - -
- - ~ 404 - - - error / not_found - -
- -
-
-
- - - 404 — Not Found - -
-

- Page not found -

-
- -
-
- - -
- -
-

- The page you’re looking for doesn’t exist. It may have been - moved, renamed, or never existed in this memory plane. -

-
- - -
-
-
- -
- [status: 404] - [ref: not_found] -
-
-
-