This repo contains the source for ohmjs.org. It's built using Docusaurus, and hosted on GitHub pages.
Historically, the Ohm web site was at ohmlang.github.io; later we started using ohmjs.org as custom domain. In theory, it should be possible to host the site itself elsewhere, as long as we don't remove the CNAME in ohmlang.github.io.
Prerequisites:
$ yarn
$ yarn start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
The main Ohm repo (ohmjs/ohm) is the canonical source for most of the documentation here. After changes are made in that repo, they can be propagated to this one:
- Make sure you have a clone ohmjs/ohm in a sibling directory (i.e.,
../ohm
, relatiive to this README). - Run
scripts/updateDocs.sh
to copy the docs into this repo - Ensure there are no build errors from
yarn start
- Commit and deploy
See Writing documentation in the Contributor Guide for some gotchas to watch out for. Note that the docs are written as GitHub-flavored Markdown (GFM), while Docusaurus uses MDX v1. While most things should "just work", there are some subtle incompatibilities. Use scripts/escapeMdx.mjs
for anything that needs to be rewritten.
$ yarn build
This command generates static content into the build
directory and can be served using any static contents hosting service.
The site is deployed to the gh-pages
branch of ohmlang/ohmlang.github.io. In order to deploy, you need write privileges to that repository.
$ yarn deploy