How wazuh/wazuh-documentation works
Main components
• Documentation Content Repository – This is primarily found in the “source” directory. It contains all the content (user manuals, guides, integration guides, release notes, etc.) organized into numerous subdirectories (e.g., “getting-started”, “user-manual”, “compliance”, “cloud-security”, “deployment-options”, and so on). It also includes a “conf.py” file for Sphinx configuration.
• Custom Extensions – Located in “source/_exts” (for example, the wazuh-doc-images extension) which likely add custom behaviors (like image handling or other transformations) to the documentation build.
• Themes & Templates – The “source/_themes/wazuh_doc_theme_v3” and “source/_templates” directories house custom CSS/SCSS, JavaScript, and HTML template files that dictate the final rendered look of the documentation site.
• Build & Integration Tools – Files at the repository’s root include “Makefile”, “Dockerfile”, and GitHub workflows under “.github/workflows” (for example, compile.yml) to automatically build and/or deploy the documentation. Additionally, configuration files for external tools (like “pagefind.yml”) and dependency declarations (like “requirements.txt”) are present.
• Resources – The “resources” directory contains assets such as cloud configuration files, dashboards data, and SELinux policy configurations that likely support some of the guides and examples.
• Supporting Assets – Various “images” directories (inside “source/images”) and others provide the media used in the documentation.
Relationships and interactions
• The content written in reStructuredText is processed by Sphinx (configured via “conf.py”), which interacts with custom extensions (in “_exts”) and applies themes (from “_themes” and “_templates”) to generate the final static documentation site.
• The CI/CD pipeline (using GitHub Actions as seen in the “.github/workflows” folder) triggers the Sphinx build process to compile the documentation upon commits (or pull requests).
• The optional integration with Pagefind (with NodeJS support when needed) provides an alternative, client-side search engine.
• Auxiliary assets (such as the various images, dashboard resources, and SELinux files) are integrated within the documentation for visual examples and detailed instructions.
Architectural patterns and design principles
• Content Separation & Modularity – The documentation is split into logical components such as “getting-started”, “deployment-options”, “user-manual”, and so on. This separation helps maintain the extensive documentation structure while keeping the build configurations (Sphinx, extensions, themes) isolated.
• Extensibility – The presence of custom Sphinx extensions and theming shows the use of plugin and template design patterns. These allow customization of both the build process and the output look and feel.
• Automation – Continuous integration using GitHub workflows and Makefile/Dockerfile scripts demonstrates automated documentation builds and deployments.
• Optional Search Integration – An option to integrate NodeJS-based Pagefind introduces a separation of concerns where the search functionality can be optionally maintained outside the core Python/Sphinx engine.
Relevant technologies and libraries
• Python 3.9+ and Sphinx (version 7.2.6) – For the documentation build process.
• sphinx-tabs, jsmin and sphinx-reredirects – To enhance content formatting, minimize JS assets, and manage URL redirects respectively.
• Optional NodeJS (v16+) – To run the Pagefind search engine if that advanced search setup is chosen.
• Custom JavaScript, SCSS, and image assets – Found in the theme directories to control the front-end behavior and styling of the final documentation site.
• GitHub Actions – To automate build and compile tasks during the CI/CD process.