← Back to the index

vv doc

Generates HTML documentation from .vv source files. It extracts docstrings (///) preceding module declarations and exported variables or functions.

vv doc [target_dir_or_file] [-o output_dir]

Options

Option Description
-o, --output Specifies the output directory for the generated documentation (default: docs).

Docstring Syntax

Docstrings are written using triple slashes (///). They must appear immediately before the declaration they document.

/// Adds two numbers.
pub let add = fun(a, b)
    a + b
end

Multilingual Support

vv doc supports multilingual documentation using the @lang tag. Documentation for different languages is generated in subdirectories (e.g., docs/en/, docs/ja/).

/// @lang en
/// English description.
/// @lang ja
/// 日本語の説明。
pub let hello = fun()
    "hello"
end