Setup
The command init
serves to prepare an existing Mojo🔥 project for instant usage
with Modo🧯 and a static site generator (SSG).
Hugo example
As an example, we use Hugo as SSG. For all supported options, see chapter formats. Navigate into your Mojo🔥 project’s root folder and run:
modo init hugo
Modo🧯 analyzes the structure of your project and tries to find Mojo🔥 packages.
It then sets up a modo.yaml
config file and a directory docs
, containing a minimal Hugo project as well as sub-directories for auxiliary documentation files and extracted doc-tests.
After that, you should be able to instantly generate your API docs with Modo🧯 and render them with Hugo:
modo build
hugo serve -s docs/site/
If your project has a GitHub repository, Modo🧯 will set up the project so that it can be deployed to GitHub Pages instantly.
For more details, see the Hugo format.
mdBook example
Similarly, with mdBook as SSG, these three commands should be sufficient to view your API docs in a web browser:
modo init mdbook
modo build
mdbook serve docs/
For more details on the generated directory structure and files, see chapter formats.
Detected packages
These are the possible project layouts the init
command can work with:
-
-
__init__.mojo
-
-
-
-
__init__.mojo
-
-
-
-
__init__.mojo
-
-
-
__init__.mojo
-
-
-
-
__init__.mojo
-
-
-
__init__.mojo
-
-