Source of docs.alcor.exchange: the user guides and the API reference. Built with Fumadocs as a static site for Cloudflare Pages.
npm install
npm run dev # http://localhost:3000
npm run build # static site in out/| Path | What |
|---|---|
content/docs/ |
Pages, one .mdx per URL: alcor-swap/pool-page.mdx is /alcor-swap/pool-page |
content/docs/api/ |
The API reference, at /api |
content/docs/**/meta.json |
Sidebar order and section titles |
public/images/ |
Images used by the pages |
lib/shared.ts |
Site name, routes and the GitHub repo |
Pages are served from the site root, so the URLs of the old GitBook site still work.
The search index is at /search.json, which leaves /api to the reference.
Add an .mdx file with a title (and optionally a description) in its frontmatter,
then list it in the folder's meta.json. Components available in every page:
<Callout type="info|warn|error|success">, <Tabs items={[...]}> with <Tab value="...">,
<Cards> and <Card>.
A Cloudflare Worker serving out/ as static assets (wrangler.jsonc), built from this repository:
- Build command:
npm run build - Deploy command:
npx wrangler deploy
The Worker's name in the dashboard must match name in wrangler.jsonc.