The NativeLink documentation
The NativeLink documentation gets deployed to <https://docs.nativelink.com>.
📚 Stack
The NativeLink documentation uses a custom, highly efficient, high performance stack. Getting a bunch of bleeding-edge tools to work well together can be challenging. Feel free to copy-paste it into your own projects.
- Diátaxis as overarching documentation philosophy.
- Pnpm as production bundler.
- Bun as build-time TypeScript interpreter.
- Biome as linting toolchain.
- Astro as meta-framework.
- Starlight as documentation framework.
- TailwindCSS 4.0-alpha for component styling which makes use of LightningCSS for faster CSS processing.
- Cloudflare Pages/Workers for deployments.
🚀 Common workflows
See docs/package.json
for build scripts.
This project requires pnpm
. The nix flake ships a compatible version.
# Install dependencies with pnpm. Don't install with bun.pnpm install
# Rebuild the API reference.pnpm metaphase
# Rebuild the simple parts of the autogenerated docs.pnpm transform
# Rebuild everything. Make sure to remove the `dist` directory beforehand.pnpm build
# Run a development server. Doesn't rebuild the autogenerated parts of the docs.pnpm dev
# Run formatter and linter checks.pnpm check
# Apply formatter and linter fixes.pnpm fix
# Test cloudflare deployments locally. Useful when debugging SSR. Rebuilds the# autogenerated parts of the docs.pnpm preview
When deploying to Cloudflare, make sure to set the PNPM_VERSION
to 8.15.5
to
stay in sync with the flake. Also, use pnpm exec playwright install && pnpm build
on the Cloudflare worker. This sets up headless Chromium which to
generate mermaid diagrams during the build. You don’t need to set playwright up
locally as it’s already configured in the flake.
🐛 Known issues
- The build process uses Bun as internal TypeScript processor, but can’t use it as bundler yet.
"@playform/compress": "=0.0.12"
because0.0.13
doesn’t compress CSS.