moodle-docs-theme
Tema sphinx baseado do Moodle Docs.
Um tema Sphinx reutilizável inspirado visualmente na documentação oficial do Moodle (docs.moodle.org), criado para temas e plugins Moodle mantidos por organizações no GitHub. Mantém a mesma identidade visual — cabeçalho claro com faixa de destaque laranja, títulos em roxo, links em azul — em toda a documentação da sua organização.
Recursos principais
- Design inspirado no MoodleDocs: cabeçalho claro com faixa de destaque laranja
(
#f98012), títulos em roxo (#6c336d), links em azul (#3366cc) — a mesma linguagem visual do docs.moodle.org. - Modo escuro: alternância de tema claro/escuro com detecção de preferência do
sistema e persistência em
localStorage. - Customização simples: cores, logotipo, fontes e links de navegação configuráveis
via
conf.py, sem editar CSS. - Blocos de código interativos: botão para copiar snippets com um clique.
- Editar no GitHub: link automático para editar a página no repositório correspondente.
- 100% responsivo: menu adaptado para dispositivos móveis e desktop.
- Automação GitHub Actions: build e deploy de docs no GitHub Pages, publicação no PyPI via Trusted Publishing a cada release.
Instalação
Via PyPI
pip install moodle-docs-theme
Instalação direta do GitHub
pip install git+https://github.com/moodle-by-kelsoncm/moodle-docs-theme.git
Desenvolvimento local
git clone https://github.com/moodle-by-kelsoncm/moodle-docs-theme.git
cd moodle-docs-theme
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
Configuração básica no conf.py
No arquivo conf.py da documentação do seu tema ou plugin Moodle, adicione:
import moodle_docs_theme
html_theme = "moodle_docs_theme"
html_theme_path = [moodle_docs_theme.get_html_theme_path()]
extensions = [
"sphinx.ext.githubpages",
]
html_theme_options = {
"primary_color": "#6c336d",
"secondary_color": "#f98012",
"project_name": "Meu Plugin Moodle",
"logo": "logo.png",
"logo_height": "32px",
"github_url": "https://github.com/usuario/meu-plugin",
"github_repo": "usuario/meu-plugin",
"github_version": "main",
"doc_path": "docs/",
"show_edit_on_github": True,
"enable_dark_mode": True,
"navigation_links": "Início|index.html, Instalação|installation.html",
}
html_static_path = ["_static"]
Veja a documentação completa para a lista completa de opções.
Estrutura do repositório
moodle-docs-theme/
├── .github/
│ └── workflows/
│ ├── ci.yml # Integração contínua e deploy no GitHub Pages
│ └── publish-pypi.yml # Deploy automático no PyPI via Trusted Publishing
├── docs/ # Documentação oficial do tema
│ ├── conf.py
│ ├── index.rst
│ ├── installation.rst
│ └── configuration.rst
├── moodle_docs_theme/ # Código fonte do tema Sphinx
│ ├── static/
│ │ ├── css/
│ │ │ ├── base.css
│ │ │ └── colors.css
│ │ └── js/
│ │ └── theme.js
│ ├── layout.html
│ ├── page.html
│ ├── searchbox.html
│ ├── breadcrumbs.html
│ ├── theme.conf
│ ├── theme.toml
│ └── __init__.py
├── setup.py
├── pyproject.toml
├── MANIFEST.in
├── LICENSE
└── README.md
Compilando a documentação localmente
pip install -e .
sphinx-build -b html docs docs/_build/html
Licença
Este projeto está licenciado sob a Licença BSD 3-Clause. Consulte o arquivo LICENSE para mais detalhes.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file moodle_docs_theme-0.1.0.tar.gz.
File metadata
- Download URL: moodle_docs_theme-0.1.0.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b71dbbc4aed3fe1d5101b9100597e17a4fe238564bc9ee283a5ac08f3c3830a
|
|
| MD5 |
19e0bdf25ed88bd989322152a3c4c454
|
|
| BLAKE2b-256 |
39beea34ecb832f3c739a8ede9d107bd4a84519f7681a7fce652b29597c3b433
|
Provenance
The following attestation bundles were made for moodle_docs_theme-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on moodle-by-kelsoncm/moodle-docs-theme
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
moodle_docs_theme-0.1.0.tar.gz -
Subject digest:
5b71dbbc4aed3fe1d5101b9100597e17a4fe238564bc9ee283a5ac08f3c3830a - Sigstore transparency entry: 2515443003
- Sigstore integration time:
-
Permalink:
moodle-by-kelsoncm/moodle-docs-theme@9b4705d98085f581f5f39220a2d7eb3997fc346d -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/moodle-by-kelsoncm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@9b4705d98085f581f5f39220a2d7eb3997fc346d -
Trigger Event:
release
-
Statement type:
File details
Details for the file moodle_docs_theme-0.1.0-py3-none-any.whl.
File metadata
- Download URL: moodle_docs_theme-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ff4cd3894d47af6f610028a9bba103bc059048c424ad5dd77822a1c89a4f62f
|
|
| MD5 |
652c184f4b039668116270947e79a9c6
|
|
| BLAKE2b-256 |
57d8dc4a989caf13d3a441319b522c4b356b06bceebbc51bd8f4d99ed1a4f6a9
|
Provenance
The following attestation bundles were made for moodle_docs_theme-0.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on moodle-by-kelsoncm/moodle-docs-theme
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
moodle_docs_theme-0.1.0-py3-none-any.whl -
Subject digest:
6ff4cd3894d47af6f610028a9bba103bc059048c424ad5dd77822a1c89a4f62f - Sigstore transparency entry: 2515443033
- Sigstore integration time:
-
Permalink:
moodle-by-kelsoncm/moodle-docs-theme@9b4705d98085f581f5f39220a2d7eb3997fc346d -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/moodle-by-kelsoncm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@9b4705d98085f581f5f39220a2d7eb3997fc346d -
Trigger Event:
release
-
Statement type: