Skip to content

docs: split docs into per-project ArkType and Attest sections - #1686

Merged
ssalbdivad merged 2 commits into
mainfrom
docs-project-sections
Oct 7, 2026
Merged

ssalbdivad merged 2 commits into
mainfrom
docs-project-sections

Conversation

@ssalbdivad

@ssalbdivad ssalbdivad commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Adds a project switcher to the docs sidebar using fumadocs root folders, starting with ArkType and Attest.

  • Existing pages move into the content/docs/(arktype)/ folder group. Fumadocs strips groups from slugs, so every existing /docs/... URL is unchanged.
  • New Attest docs at /docs/attest: setup, assertions, benches, options, CLI and integration. Examples are type-checked by twoslash. The README's stale option defaults and broken custom assertion example are fixed in the move.
  • ark/attest/README.md keeps the intro and install and links to the docs instead of duplicating them.
  • InstallationTabs accepts pkg/dev props.
  • llms.txt is generated per section: /llms.txt covers ArkType (now including the cheat sheet), and /docs/attest/llms.txt covers Attest.

More packages can be added as sibling root folders (content/docs/<pkg>/meta.json with "root": true).

🤖 Generated with Claude Code

Uses fumadocs root folders so the sidebar shows a project switcher and
only the active project's pages. Existing pages move into the
`(arktype)` folder group, which fumadocs strips from slugs, so every
existing /docs URL is unchanged. Further packages can be added as
sibling root folders.

Attest's README content moves to /docs/attest (setup, assertions,
benches, options, cli, integration) with examples type-checked by
twoslash. Its stale option defaults and broken custom assertion example
are corrected, and the README now links to the docs instead of
duplicating them.

llms.txt is now generated from the ArkType section only, and is
regenerated to include the cheat sheet.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Reviewed the per-project docs restructure (60 files): existing pages moved into content/docs/(arktype)/, plus the new Attest docs section.

  • Route-group move — pages relocated under (arktype) with "root": true. Verified against the installed fumadocs-core: getSlugs filters names matching /^\(.+\)$/, so every existing /docs/... URL is preserved, and DocsLayout derives the root toggle automatically from the tree.
  • New Attest docs — six pages under content/docs/attest. Cross-checked the substantive examples against source: option defaults match getDefaultAttestConfig (ark/attest/config.ts), the .json snapshot matches divisor.test.ts, the error messages match structure/index.ts and divisor.ts, and the rewritten getTypeAssertionsAtPosition example matches the VersionedTypeAssertion/TypeRelationshipAssertionData shapes.
  • InstallationTabs — new pkg/dev props produce correct install commands for pnpm/npm/yarn/bun; the existing <InstallationTabs /> call site still renders the same output.
  • writeLlmsTxt — scoped to (arktype); regenerated public/llms.txt adds only the cheat sheet, consistent with the stated intent.
  • Attest README trim + @ark/attest docs dependency — pnpm install --frozen-lockfile validates cleanly and prettier/eslint pass on the changed files.

No blocking or actionable issues found.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

Resolves the attest README conflict by keeping the trimmed README and
moving main's TS version and getTypeAssertionAtPosition changes into the
attest docs. writeLlmsTxt now writes one llms.txt per docs section, with
attest's served at /docs/attest/llms.txt.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ssalbdivad
ssalbdivad merged commit 1ca8cea into main Oct 7, 2026
1 check passed
@ssalbdivad
ssalbdivad deleted the docs-project-sections branch October 7, 2026 23:32
ssalbdivad added a commit that referenced this pull request Oct 7, 2026
Main's #1686 moves attest's README content into the docs site, so the
branch's bench guidance (median, returning results, threshold modes) is
ported into attest/benches.mdx and llms.txt is regenerated.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ssalbdivad added a commit that referenced this pull request Oct 8, 2026
ArkRegex's docs lived in its README and the announcement post. It now has
its own root section at /docs/regex, mirroring the Attest split (#1686):
setup, inference, errors, types (Regex, regex.infer/parse/validate,
regex.as), ArkType integration and an FAQ. Types in the examples are
twoslash queries, so they are computed from the built package and fail the
docs build if they drift.

The section gets its own llms.txt at /docs/regex/llms.txt. The primitives
page links to it instead of the announcement, and the README now points at
it instead of carrying the FAQ. The README's semver example switches from
\d* to \d+, since \d* infers an eight-member union, not the type shown.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done (merged or closed)

Development

Successfully merging this pull request may close these issues.

1 participant