Configuration¶
All options are passed via html_theme_options in the conf.py file of your project:
html_theme_options = {
"primary_color": "#6c336d",
"secondary_color": "#f98012",
"project_name": "My Moodle Plugin",
"logo": "logo.png",
"logo_height": "32px",
"tagline": "Plugin documentation",
"github_url": "https://github.com/org/repo",
"github_repo": "org/repo",
"github_version": "main",
"doc_path": "docs/en/",
"show_edit_on_github": True,
"enable_dark_mode": True,
"enable_language_selector": True,
"navigation_links": "Home|index, Installation|installation, Usage|usage",
}
Available options¶
Option |
Default |
Description |
|---|---|---|
|
|
Primary brand color (purple), used for section titles and accents. |
|
|
Accent color (Moodle orange), used for header stripe and active tabs. |
|
|
Display name shown in the top header. |
|
|
Logo filename located inside |
|
|
Logo display height in header. |
|
|
Full URL to GitHub repository. |
|
|
Repository in |
|
|
Target git branch for edit links. |
|
|
Relative path to docs directory in git repository. |
|
|
Show “Edit on GitHub” button in the navigation. |
|
|
Enable the light/dark mode theme toggle button. |
|
|
Enable bilingual flag switcher in the header (USA and Brazil flags). |
|
|
Links in format |
Overriding styles¶
Each project may override CSS variables by placing a custom stylesheet in
_static/css/custom.css and referencing it in html_css_files:
:root {
--moodle-primary: #4a2350;
--moodle-accent: #ff7a00;
}