Modo🧯 -- Documentation generator (DocGen) for Mojo🔥

Modo:fire_extinguisher: is a documentation generator (DocGen) for the Mojo​:fire: programming language. It generates Markdown for static site generators (SSGs) from mojo doc JSON output.

This example in the User guide shows a Mojo🔥 package processed with Modo🧯 and rendered with Hugo, to demonstrate Modo🧯’s features.

Features

  • Generates Mojo🔥 API docs for Hugo, mdBook or just plain Markdown.
  • Provides a simple syntax for code cross-references.
  • Optionally structures API docs according to package re-exports.
  • Optionally extracts doc-tests for mojo test from code blocks.
  • Customizable output through user templates.

See the User guide for more information.

Your feedback and contributions are highly appreciated!

8 Likes

Modo :fire_extinguisher: now can extract doc-tests also from additional Markdown files. :fire:

Modo :fire_extinguisher: v0.10.0 is out and brings some major usability improvements:

  • Command init now analyzes the structure of the Mojo project and sets everything up to work instantly.
  • Flag --watch introduces a watch mode, so that edits can be reviewer in a web browser instantly.
  • Flag --report-missing reports missing docstrings and a documentation coverage percentage.
  • Command clean cleans up a project from Markdown and test files generated by Modo.
1 Like

Hi, great work :fire:
Is there a way in Modo to automatically add links to the modules’ implementations (e.g. on Github)?

Thanks! No, currently not. But this is a great feature idea that is easy to implement! Would you like to open an issue for that? Otherwise, I would do that to keep track of it.

1 Like

@TilliFe Your requested feature is now available in the dev version.

2 Likes

Modo:fire_extinguisher: v0.11.0 is out, with these new features, among other improvement:

  • Automatially adds links from doc pages to the containing module’s source
  • Supports renaming of re-exports like in from .mod import X as Y
  • Struct methods can inherit docs from the parent trait

Check the release for more details!

2 Likes