{"id":13726079,"url":"https://github.com/ocaml-doc/voodoo","last_synced_at":"2026-01-16T16:51:39.173Z","repository":{"id":41965668,"uuid":"322332147","full_name":"ocaml-doc/voodoo","owner":"ocaml-doc","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-26T16:25:08.000Z","size":5177,"stargazers_count":14,"open_issues_count":18,"forks_count":15,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T21:38:59.947Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ocaml-doc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-17T15:15:25.000Z","updated_at":"2024-11-17T16:38:52.000Z","dependencies_parsed_at":"2024-02-13T14:01:28.910Z","dependency_job_id":"9e41ff79-0a02-4ef5-b92b-9d98a8932fb7","html_url":"https://github.com/ocaml-doc/voodoo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ocaml-doc/voodoo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml-doc%2Fvoodoo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml-doc%2Fvoodoo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml-doc%2Fvoodoo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml-doc%2Fvoodoo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ocaml-doc","download_url":"https://codeload.github.com/ocaml-doc/voodoo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml-doc%2Fvoodoo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T01:02:51.793Z","updated_at":"2026-01-16T16:51:39.146Z","avatar_url":"https://github.com/ocaml-doc.png","language":"OCaml","readme":"\u003ch1 align=\"center\"\u003e\n  voodoo\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eVoodoo uses odoc to generate the package documentation for OCaml.org\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://ocaml.ci.dev/github/ocaml-doc/voodoo\"\u003e\n    \u003cimg src=\"https://img.shields.io/endpoint?url=https%3A%2F%2Fci.ocamllabs.io%2Fbadge%2Focaml-doc%2Fvoodoo%2Fmain\u0026logo=ocaml\" alt=\"OCaml-CI Build Status\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## :rocket: Getting started\n\n**voodoo** is intended to be used as part of an\n[ocurrent](https://github.com/ocurrent/ocurrent) pipeline, for example\nvia [ocaml-docs-ci](https://github.com/ocurrent/ocaml-docs-ci).\n\nYou need `opam`, you can install it by following [Opam's documentation](https://opam.ocaml.org/doc/Install.html).\n\nWith `opam` installed, you can install the dependencies in a new local switch with:\n\n```bash\nmake switch\n```\n\nThen, build the project with:\n\n```bash\nmake build\n```\n\n**voodoo** is run in three successive steps detailed below.\n\n## :seedling: 1. Prepare the packages: voodoo-prep\n\nTo prepare the packages just run:\n\n```sh\nvoodoo-prep [-u \u003cUNIVERSES\u003e]\n```\n\nWhere `\u003cUNIVERSES\u003e` is a comma-separated list of packages and universes `pkg1:unv1,pkg2:unv2,...`.\n\nWhen you don't provide a universe explicitly, each package installed in the current switch will be prepared (prepped) for the compiling step.\n\nThis creates an ad-hoc directory structure and populates it with `.cmt`, `.cmi`, `.cmti`, `.mld` from the current switch.\nThe `ocamlobjinfo` of the `.cma` files are also copied, as well as the documentation files such as `.md`, `.html` and others (such as the `opam` files). \n\n\n## :sweat_drops: 2. Compiling and linking the packages: voodoo-do\n\nOnce `voodoo-prep` has run, `voodoo-do` is able to process packages. Simply run:\n\n```sh\nvoodoo-do -p \u003cPACKAGE\u003e [-b] [--failed]\n```\n\nThis command runs `odoc compile` and `odoc link` on the package specified after `-p`.\nIf the `--failed` flag is set, a file named `failed` containing `\"failed\"` is also generated.\n\nIf the packages are processed out of dependency order, `voodoo-do` will alert that there are missing dependencies.\n\n```sh\nvoodoo-do -p odoc -b\n...\nMissing dependency: Stdlib c21c5d26416461b543321872a551ea0d\n...\n```\n\nIn this case, we need to run `voodoo-do -p ocaml-base-compiler -b` first.\n\nNote that when being used in this mode, the `-b` flag should always be passed to `voodoo-do`.\n\nAt this point, to view the output, use `odoc` to generate the support files (mostly: copying `highlight.js` from https://highlightjs.org and `odoc.css`):\n\n```bash\ncd ..\nodoc support-files -o html\n```\n\nYou can load the package index in your browser:\n\n```sh\nopen ./html/p/\u003cPACKAGE\u003e/\u003cVERSION\u003e/doc/index.html\n```\n\n## :deciduous_tree: 3. Rendering the packages: voodoo-gen\n\nOnce `voodoo-do` has run, you can generate the website with the documentation, run:\n\n```bash\nvoodoo-gen -o \u003cDIR\u003e [-n \u003cPACKAGE\u003e] [--pkg-version \u003cVERSION\u003e]\n```\n\nThis command runs `odoc html-generate` to render the files of the specified package as html.\n\nYou can serve it with:\n\n```bash\nopam install dream-serve\ndream-serve ./html\n```\n\nLoad the package index in your browser:\n\n```bash\n$ open http://localhost:8080/p/\u003cPACKAGE\u003e/\u003cVERSION\u003e/doc/index.html\n```\n\n## :horse_racing: TLDR\n\n1. Install packages to be documented in the current switch using `opam`\n1. Create `_generated` directory\n1. Run `voodoo-prep`. This creates the _ad-hoc_ directory structure inside `_generated` and populates it with `.cmt`, `.cmi`, `.cmti`, `.mld` from the current switch. Documentation files such as `.md`, `.html` and others are also copied.\n1. Run `voodoo-do` on each package to compile and link the odoc files.\n1. Run `voodoo-gen` to create the `_generated/output` directory and generate the HTML files.\n1. Run `odoc support-files -o _generated/html` to add css and styling to the `html` subdirectory\n1. Serve `_generated/html`\n\n`voodoo-*` commands must be called from the `_generated` directory.\n\n```sh\nmkdir _generated\ncd _generated\nopam exec -- dune exec -- voodoo-prep\nopam exec -- dune exec -- voodoo-do -p \u003cPACKAGE\u003e -b\nopam exec -- dune exec -- voodoo-gen -o output\ncd ..\nodoc support-files -o _generated/html\ndream-serve _generated/html\n```\n","funding_links":[],"categories":["OCaml"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focaml-doc%2Fvoodoo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focaml-doc%2Fvoodoo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focaml-doc%2Fvoodoo/lists"}