Reusable Documentation Template¶
moodle-docs-theme provides a standard bilingual documentation template ready to use
across all plugins and repositories of the Moodle by KelsonCM organization.
The template standardizes:
Bilingual structure with English (default) in
docs/en/and Brazilian Portuguese indocs/pt-br/.Automatic language router at
docs/index.htmlredirecting users according to browser preferences or stored choice.Standard reStructuredText pages (
index.rst,installation.rst,configuration.rst,usage.rst).Python requirements in
docs/requirements.txt.Automated GitHub Actions workflow (
.github/workflows/docs.yml) for building and deploying to GitHub Pages.
How to Use the Template¶
Via CLI moodle-docs-theme init (Recommended)¶
To initialize documentation in any plugin repository:
Navigate to the repository root directory:
cd /path/to/plugin_repository
Run the
initcommand:
moodle-docs-theme init
The CLI automatically detects directory names, infers plugin categories in Moodle, and creates the complete bilingual documentation structure.
Available CLI Options¶
Option |
Description |
|---|---|
|
Target repository root path (default: current directory |
|
Project name (default: directory name). |
|
GitHub repository path (default: |
|
English tagline for documentation header. |
|
Portuguese tagline for documentation header. |
|
Version string (default: |
|
Overwrite existing template files. |
|
Generate legacy single-language template directly in |
|
Skip generating |