k8ordo
  • UI
  • Form
  • State
  • Router
  • Static
  • Server
Switch to dark mode
k8ordo

React libraries that use Baseline features without holding back.

Packages
  • @k8ordo/ui
  • @k8ordo/form
  • @k8ordo/state
  • @k8ordo/router
  • @k8ordo/static
  • @k8ordo/server
UI
  • Get Started
  • Theming
  • i18n
  • Components
  • Hooks
  • Helpers
  • AI Chat
  • Generative UI
  • AI Agents
  • Storybook
Resources
  • GitHub
  • npm

© 2026 k8o — MIT License

Typeset in Noto Sans JP & M PLUS 2

@k8ordo/static

Builds an application into files. Every route is rendered ahead of time, and what ships is a directory a static host can serve — no server at run time.

npmGitHub

Directories are the URL

The routes/ tree is the pathname space; the table and the type wiring are generated from it.

Features

  • routes/ is the URL spaceThe directory tree is the pathname space: page/layout/not-found, [param], (group), and _-prefixed privates. Anything outside the grammar fails the build.
  • The wiring is not yours to writeThe route table and the typed-path wiring into router and state are generated — as ordinary source using the public API, readable in a diff.
  • Boundaries are checkedExecution is declared with React's own 'use client'. The build fails the moment a server-only module reaches the client, so secrets cannot cross however many imports sit in between.
  • The mode is the dependencyInstalling this package is what makes the application static: Server Actions and request-time data are not rules to remember but APIs that do not exist. Parameterised routes must be enumerated, or the build stops. Pass site and the build writes sitemap.xml too.
  • error.tsx and redirect.tsWhen a page throws, error.tsx renders inside the layout and the frame survives; a page that throws during the build stops it. A directory that moved keeps a one-line redirect.ts.
  • Parameters take a schemaA page.tsx or layout.tsx that exports paramsSchema makes a refused value a pathname the pattern does not answer, so it falls through to not-found. Links take what the page receives, typed by the schema.

Documentation

The guide ships inside the npm package. An AI coding assistant reads the exact installed version out of node_modules/@k8ordo/static/docs/.

Home
// src/routes/page.tsx                → /
// src/routes/products/page.tsx       → /products
// src/routes/products/[id]/page.tsx  → /products/:id(paramsSchema が id を検証)
// src/routes/error.tsx               → 配下が throw したら layout の内側に
// src/routes/old/redirect.ts         → /old は別の場所へ

// vite.config.ts — 値を持たない区間だけ、ビルドに渡す
export default defineConfig({
  plugins: [
    framework({
      paths: async () => {
        const products = await readCatalog();
        return products.map((product) => `/products/${product.id}`);
      },
    }),
  ],
});