Risotto is a simple, lightweight static site generator that converts Markdown (.md) files into a styled HTML documentation website.
It supports light/dark themes, configurable colors, logos, and navigation structure β all controlled through a config.risotto file.
your-project/
βββ docs/
β βββ index.md
β βββ category1/
β β βββ intro.md
β β βββ usage.md
β βββ category2/
β βββ guide.md
βββ example.config.risotto
βββ risotto.py
Risotto uses only the Python standard library β no external dependencies required.
You just need Python 3.8+ installed.
Copy the example configuration to your working config file:
cp example.config.risotto config.risottoYou can edit config.risotto to customize:
- Site name and title
- Description and favicon
- Logo for light/dark themes
- Theme colors
- Output directory
- Home page name
Place your Markdown files under the docs/ directory.
Each subfolder becomes a category in the sidebar.
Example:
docs/
βββ index.md
βββ GettingStarted/
β βββ install.md
β βββ config.md
βββ Advanced/
βββ tips.md
Run the generator:
python3 risotto.pyOptional flags:
python3 risotto.py --docs docs --config config.risottoThis will:
- Convert all Markdown files in
docs/to HTML - Create the output folder (default:
site/) - Generate:
site/index.html(home page)site/<category>/<page>.htmlfor each subpage
The generated site includes a built-in theme toggle:
- Automatically detects system light/dark mode
- Saves user preference to
localStorage - Fully configurable through your
config.risotto
Risotto supports:
- Headings (
#,##,###, etc.) - Bold and italic (
**bold**,_italic_) - Inline code and code blocks (
`code`orpython ...) - Links (
[text](url)) - Ordered and unordered lists
After running the build, open:
site/index.html
in your browser to preview your generated documentation.
- The home page (
index.md) is required. - All other Markdown files must be inside subdirectories.
- You can safely re-run the generator after editing files β it overwrites existing HTML.
Enjoy your hot, fresh docs!