Contributing to Ocsigen

For individual contributors

To contribute to an Ocsigen project, first see the guidelines it provides. It will give you the directives on how to make your contribution. Once ready, create a Pull Request on the repository and wait for feedback!

Every contribution has to be documented! The documentation now lives in the project's own repository, alongside the code: hand-written manual pages as doc/*.mld files and API documentation as comments in the .mli files, all in odoc syntax. A single pull request on the project's main branch therefore carries both your code and its documentation — there is no separate documentation branch anymore (the old wikidoc branch and the wikicréole format are gone).

The CI checks that the documentation builds without errors on every push to your branch, and, once merged, rebuilds and publishes it automatically to the project's gh-pages branch, served at https://ocsigen.org. Do not hesitate to ask for help if you experience any trouble.

Create a release (for package maintainers)

  1. Make sure the documentation sources (doc/*.mld and the .mli comments) are up to date with the code on master; the CI rebuilds the dev docs on every push to master.
  2. Freeze the current dev docs as the new version on the project's gh-pages branch: wodoc release --site . --version X.Y.Z (copies dev/ to X.Y.Z/ and repoints the latest symlink), then commit and push.
  3. Update file CHANGES
  4. On master, update opam configuration file.
  5. git tag <version> then git push --tags
  6. Create a release on GitHub.
  7. opam publish and wait for the package to be accepted.
  8. Announce the release on the blog: add a file doc/blog/posts/YYYY-MM-DD-slug.mld to repository ocsigen.github.io and open a pull request (its README.md explains the format). The blog's Atom feed is followed by OCaml Planet, which shows the first paragraph of the post.

Local documentation generation

Every project's documentation is built by wodoc (an odoc driver) from its .mld manual pages and .mli API comments, configured by a single doc/wodoc file in the project. To build it locally, from the project root:

wodoc build --config doc/wodoc --out _doc-site/dev --label dev \
  --menu https://ocsigen.org/doc/menu.html --local

--local also fetches the shared /css/ and /img/ assets so the result is viewable offline (cd _doc-site && python3 -m http.server, then open localhost:8000/dev/). See the project's doc/README.md for the exact command and the opam switch it needs.

Main site

The vitrine (this site's home, projects, install, credits, papers, contributing) lives in repository ocsigen.github.io, branch master, directory doc/vitrine/ (.mld sources), and the blog in doc/blog/. A GitHub Action (.github/workflows/doc.yml) rebuilds both with wodoc on every push to master, so there is nothing to run by hand. Every other project publishes its own documentation on its own gh-pages branch, served at ocsigen.org/<project>/. The active projects build it with their own GitHub Action. The two archived projects, ocsimore and html_of_wiki, keep their sources in this repository (doc/ocsimore/ and doc/html_of_wiki/), but no workflow rebuilds them: they are rebuilt by hand and committed to the gh-pages branch of their own repository (see the README.md of ocsigen.github.io).