Skip to content

Generate your own documentation

Learn how to generate a documentation website just like this one!

  1. Download rescript-docs-gen project

    wget -O rescript-docs-gen.zip https://codeberg.org/lil5/rescript-docs-gen/archive/main.zip
    unzip rescript-docs-gen.zip
    rm rescript-docs-gen.zip
    cd rescript-docs-gen
  2. Generate the rescript json documentation from your project

    mkdir -p ./src/data/file
    npx rescript-tools@0.6.6 doc <my_project>/src/File.res > ./src/data/file/File.json
  3. Copy the readme file of your project (optional)

    cp <my_project>/README.md ./src/data/file/README.md
  4. Build the html documentation website

    pnpm install
    pnpm run build
  5. Done! Documentation is found in dist/, copy the contents to a webhost

    • Directorydist
      • __astro
      • chunks
      • guides
      • pages
      • reference
      • _astro-internal_middleware.mjs
      • _noop-actions.mjs
      • 404.html
      • favicon.svg
      • index.html
      • manifect_wytaorsiet.mjs
      • renderers.mjs