Skip to content

Repository files navigation

WASIX Docs

Source of wasix.org. Built with Next.js and Nextra, exported as a static site and served on Wasmer Edge by wasmer/static-web-server.

Local development

pnpm install
pnpm dev

Then open http://localhost:3000/.

Docs live in content/. Sidebar order and titles come from the _meta.ts file in each folder.

The homepage lives in components/home/, with C/C++, Rust, and Python installation instructions in Install.tsx. The /builds page lives in components/builds/; update packages.ts to maintain the curated wasinix recipe links. The catalog links to GitHub for current build activity rather than displaying cached status.

Navigation, footer, and the vector logo are shared in components/. Site styles live in styles/global.css; styles/header.css styles the shared header and Pagefind search across every page. Editable logo and social-preview assets are in public/.

The infinity mark and highlighted crossing are defined in assets/brand/wasix-mark.json. After editing the mark, run node scripts/generate-brand-assets.mjs to refresh the downloadable logos, favicons, and social preview.

The documentation theme is scoped in styles/docs.css and keeps Nextra's sidebar, search, syntax highlighting, and theme controls. Overview components live in components/docs/; components/toolchains.mjs keeps their installation commands in sync with the homepage.

Build and preview the static site

pnpm build          # writes the static site to ./out and the search index to ./out/_pagefind
pnpm preview        # serves ./out on http://127.0.0.1:8080 (requires Python 3)

Markdown for agents

Every content page has a Markdown version generated by pnpm build:

  • //.md
  • /builds//builds.md
  • /docs//docs.md
  • /docs/api-reference/wasix/sock_open//docs/api-reference/wasix/sock_open.md

Each HTML page advertises its Markdown URL with a <link rel="alternate" type="text/markdown" href="…"> in the document head. Appending .md to a trailing-slash URL also works, such as /docs/.md. /llms.txt provides a complete index of these pages.

The generator in scripts/generate-agent-pages.mjs converts the rendered page content, so React components are included without exposing JSX or navigation UI. It preserves code examples, tables, callouts, and file trees, and rewrites internal links to their Markdown equivalents. Each file includes title, description, canonical HTML URL, and Markdown URL in frontmatter. The homepage has a concise agent overview in scripts/lib/agent-overview.mjs; its commands share the same toolchain data as the website.

The build checks every page's discovery link, Markdown file, internal Markdown links, and original code examples. Run pnpm test:markdown for conversion tests. These files are generated in out/, so rebuild before previewing Markdown changes. The preview server sends Markdown with Content-Disposition: inline, including dotfiles such as /.md. Browser navigation receives text/plain; charset=utf-8 for compatibility with browsers that download unfamiliar MIME types; requests with Accept: text/markdown receive text/markdown; charset=utf-8. The body is identical in both cases. Use pnpm preview instead of a generic static file server, which may label Markdown as a binary download. Production hosting must also allow these dotfiles and configure inline text responses for browser navigation. Run pnpm test:preview to check the HTTP headers and response bodies.

Deploy

Pushes to main build and deploy via GitHub Actions. To deploy manually:

pnpm build
wasmer deploy --owner wasmer --non-interactive

Notes

zod is pinned below 4.4 through pnpm.overrides in package.json. Nextra 4.6.1 strips children before validating the Layout props and zod 4.4+ rejects that (see shuding/nextra#5008). Drop the pin once a Nextra release includes the fix.

Releases

Packages

Used by

Contributors

Languages