Skip to main content

OCaml Packages Documentation

You can view the published odoc pages here: https://mbarbin.github.io/doc-experiment-docusaurus/odoc/.

Currently, Docusaurus does not offer built-in support for directly embedding odoc-generated documentation pages within its site structure. This limitation stems from the distinct ways Docusaurus and odoc handle page rendering and navigation. While Docusaurus is designed for markdown files and React components, odoc generates static HTML files from OCaml documentation comments, leading to a mismatch in integration capabilities.

Despite this, there's a straightforward workaround to include odoc documentation in your Docusaurus website. By manually copying the odoc compilation artifacts into the static directory of your Docusaurus project, you can make these pages accessible for publishing. This process effectively bridges the gap between the two systems, allowing your odoc-generated documentation to become part of your site's content.

This extra step is performed during the deployment phase, ensuring that the latest documentation is always available and seamlessly integrated into your Docusaurus site.

Future Improvements and Interoperability

We are continuously monitoring developments in both Docusaurus and odoc to improve the integration of OCaml package documentation within our Docusaurus site. Our goal is to stay abreast of any changes or improvements that could simplify or enhance the interoperability between these two systems. Should new features become available that facilitate a more seamless integration, we will eagerly explore and potentially incorporate them into our setup. This commitment ensures that we can provide the most efficient and user-friendly documentation experience possible.

Enhancing Search Functionality

One of the standout features of odoc is its ability to generate a search functionality within the odoc pages, making it easier for users to find the information they need. In line with our goal to enhance the user experience on our Docusaurus site, we are exploring the possibility of integrating an Algolia search bar. This addition would not only improve the site's overall usability but also determine whether Algolia's crawling capabilities can include the odoc-generated pages. If successful, this would allow for a single, comprehensive search box capable of searching through the entire documentation content.

Stay tuned for updates on this exciting development!