Commit Graph
2 Commits
Author SHA1 Message Date
zeekayandHanzo Dev 012a1a2d4e fix(collections): generate the content collections into one place
`@hanzo/docs-mdx` writes the collection modules to its outDir, `.docs/`.
Nothing read them there. Apps read a committed `docs/` copy instead, reached
three different ways:

  13 apps  `@hanzo/mdx:collections/server` + a webpack alias -> ./docs/*.ts
   3 apps  `@/docs/server`, straight into the committed copy
   2 apps  the alias, with no committed copy at all

The two with no copy — bootnode-docs and tasks-docs — could not build:

    ./lib/source.tsx
    Module not found: Can't resolve '@hanzo/mdx:collections/server'

and four more built from a copy that no longer matched the content beside it:

    ./docs/server.ts
    Module not found: Can't resolve
      '../content/docs/reference/templates/USER.mdx?collection=docs&only=frontmatter'

That is what committing generated code buys: the build reads a snapshot of
the content rather than the content.

One name, one location, every app: `@hanzo/mdx:collections/*`, resolved to
`.docs/` — the generator's own output, rewritten on every build, gitignored.
`tsconfig` gains the matching `paths` entry so the specifier type-checks
instead of relying on `ignoreBuildErrors`; apps/docs stops overriding outDir
in both `next.config.mts` and `gen:collections`; turbo caches `.docs/**`. The
16 committed mirrors are deleted. Examples already did it this way.

`.source` goes with them — this fork's outDir has been `.docs` for a while,
leaving `.source` in the vite plugin's JSDoc, an example's import map, an
oxlint ignore and `.gitignore` pointing at a directory nothing writes.

Also declares in `globalEnv` the env vars the build scripts actually read
(HANZO_DOCS_SYNC, HIPS_REPO_DIR, DOCS_SECTION, the search vars...). Turbo
does not forward undeclared vars, so `HANZO_DOCS_SYNC=0 turbo run build` had
no effect on the sync it names.

  turbo run build --filter='./apps/*' --continue
    before  Tasks: 33 successful, 40 total
            Failed: bootnode-docs, docs, engine-docs, ml-docs, router-docs,
                    spec, tasks-docs
    after   Tasks: 38 successful, 40 total
            Failed: docs, spec        (both for unrelated reasons, fixed next)

(cherry picked from commit 3d11394b092530489b60931e46b4938a88a2bdd5)

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-04 18:39:19 -07:00
zeekay 108d37431a Consolidate docs: remove 3 apps, add 2, expand main docs
Removed standalone apps (content absorbed into main docs):
- apps/explorer-docs/
- apps/hsm-docs/
- apps/indexer-docs/

Added new standalone apps:
- apps/bootnode-docs/ — Blockchain infrastructure
- apps/dns-docs/ — DNS/domain management

Expanded main docs (apps/docs/):
- New Infrastructure section: tasks, functions, pubsub, o11y, zt
- New Web3 section: services/web3/ (7 pages)
- Services meta.json: 40+ services in 7 categories

S3 domain consolidation:
- hanzo.space → s3.hanzo.ai
- s3.hanzo.space → s3-api.hanzo.ai

Updated footer with s3.hanzo.ai link
2026-03-14 16:26:24 -07:00