RuneDocs is a small static documentation generator written in
Odin. It scans a project for Markdown files and source
comments, converts the documentation it finds into HTML, and writes a browsable
static site to build/.
The generated site includes:
- An
index.htmllanding page. - One HTML page for each Markdown document in
docs/. - One HTML page for each source file with extractable comments in
src/andexamples/.
For Markdown files, the page title is taken from the first # Heading. If no
top-level heading exists, RuneDocs uses the filename stem as the title.
For source files, RuneDocs extracts contiguous line-comment blocks. Supported comment prefixes are:
/////!//
Supported source file extensions are:
.odin.c.h.cpp.hpp.rs.go.js.ts.py
The Markdown renderer is minimal.
It supports:
#,##, and###headings.- Paragraphs.
- Fenced code blocks using triple backticks.
- HTML escaping for generated content.
It does not currently implement the full Markdown specification, lists, tables, links, emphasis, images, or syntax highlighting. This will be coming in future versions.
- Odin compiler installed and available on your
PATH.
Check your Odin installation with:
odin versionFrom the repository root:
odin build src -out:RuneDocsThis creates the RuneDocs executable in the project root.
Run either command from the repository root:
./RuneDocsor:
./RuneDocs buildBoth commands generate the static site in build/.
After generation, open build/index.html in a browser or serve the build/
directory with any static file server.
RuneDocs includes a simple local HTTP server:
./RuneDocs serveBy default this rebuilds the docs and serves build/ at:
http://127.0.0.1:8080
You can pass a custom port:
./RuneDocs serve 3000Usage:
RuneDocs build
RuneDocs serve [PORT]
Create Markdown files under docs/:
docs/getting-started.md
or add documentation comments to supported source files:
/// Builds the static documentation site.
/// This scans Markdown files and source comments.
build_docs :: proc() -> os.Error {
// ...
}Then rebuild:
./RuneDocs buildGenerated pages will appear under build/ using their project relative paths.