Skip to content

Commit 9b29d48

Browse files
authored
docs: add explanation of documentation system architecture (#758)
Add a new page explaining how the DiracX documentation system works, including: - Overview of MkDocs with Material theme - The Divio documentation system (tutorials, how-to, reference, explanation) - Multi-repository architecture with mkdocs-diracx-plugin - Three audiences (users, administrators, developers) - Navigation structure and edit URLs Part of addressing issue #614.
1 parent 7170743 commit 9b29d48

2 files changed

Lines changed: 116 additions & 0 deletions

File tree

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Documentation System
2+
3+
This page explains how the DiracX documentation system works, including its architecture, organization, and contribution guidelines.
4+
5+
## Overview
6+
7+
The DiracX documentation is built using [MkDocs](https://www.mkdocs.org/) with the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) theme. The documentation is hosted at [diracx.io](https://diracx.io/).
8+
9+
## The Divio Documentation System
10+
11+
DiracX documentation follows the [Divio documentation system](https://documentation.divio.com/), which organizes content into four distinct categories based on their purpose:
12+
13+
| Category | Orientation | Purpose |
14+
| ----------------- | ---------------------- | ------------------------------------------------------------------ |
15+
| **Tutorials** | Learning-oriented | Hands-on lessons that guide beginners through completing a project |
16+
| **How-to guides** | Goal-oriented | Step-by-step instructions for accomplishing specific tasks |
17+
| **Reference** | Information-oriented | Technical descriptions and specifications |
18+
| **Explanation** | Understanding-oriented | Background context and conceptual discussions |
19+
20+
Each category serves a different need:
21+
22+
- **Tutorials** teach newcomers by doing. They should be reliable, repeatable, and focused on learning rather than the end product.
23+
- **How-to guides** solve specific problems. They assume the reader knows what they want to achieve and provide direct instructions.
24+
- **Reference** material describes the machinery. It should be accurate, consistent, and structured for quick lookup.
25+
- **Explanation** discusses topics in depth. It provides context, alternatives, and reasoning behind design decisions.
26+
27+
## Multi-Repository Architecture
28+
29+
DiracX documentation is aggregated from multiple repositories using the [`mkdocs-diracx-plugin`](https://github.com/DIRACGrid/mkdocs-diracx-plugin). This allows each repository to maintain its own documentation while presenting a unified site to users.
30+
31+
| Repository | Default Branch | Documentation Focus |
32+
| ------------------------------------------------------------- | -------------- | ---------------------------------------------------------- |
33+
| [`diracx`](https://github.com/DIRACGrid/diracx) | `main` | Core documentation, API reference, developer guides |
34+
| [`diracx-charts`](https://github.com/DIRACGrid/diracx-charts) | `master` | Helm charts, installation guides, deployment documentation |
35+
| [`diracx-web`](https://github.com/DIRACGrid/diracx-web) | `main` | Web interface documentation, UI guides |
36+
37+
### How the Plugin Works
38+
39+
The `mkdocs-diracx-plugin` operates during the MkDocs build process:
40+
41+
1. Copies the primary documentation from the `diracx` repository
42+
2. Clones or copies documentation from each configured external repository
43+
3. Merges the documentation trees together
44+
4. Tracks file origins to generate correct edit URLs
45+
46+
### File Precedence
47+
48+
When files exist in multiple repositories at the same path, later repositories in the configuration override earlier ones. The order in `mkdocs.yml` is:
49+
50+
1. `diracx` (base)
51+
2. `diracx-charts` (overlays on top)
52+
3. `diracx-web` (overlays on top)
53+
54+
This allows downstream repositories to extend or replace documentation pages as needed.
55+
56+
## Three Audiences
57+
58+
The documentation is organized around three primary audiences:
59+
60+
### Users (`/user/`)
61+
62+
People who interact with DiracX to submit jobs, manage data, or consume services. They need to understand:
63+
64+
- How to authenticate and access the system
65+
- How to use the web interface
66+
- How to use command-line tools and APIs
67+
- Common workflows and best practices
68+
69+
### Administrators (`/admin/`)
70+
71+
People who install, configure, and maintain DiracX deployments. They need to understand:
72+
73+
- Installation requirements and procedures
74+
- Configuration options
75+
- Security and authentication setup
76+
- Monitoring and troubleshooting
77+
78+
### Developers (`/dev/`)
79+
80+
People who contribute code to DiracX or build extensions. They need to understand:
81+
82+
- Development environment setup
83+
- Architecture and design patterns
84+
- Testing strategies
85+
- Contribution guidelines
86+
87+
## Navigation Structure
88+
89+
The navigation structure is defined entirely in the primary `diracx` repository's `mkdocs.yml` file. External repositories contribute documentation files but do not modify the navigation.
90+
91+
When adding new pages:
92+
93+
1. Create the markdown file in the appropriate repository's `docs/` directory
94+
2. Add the navigation entry to `diracx/mkdocs.yml`
95+
3. Follow the Divio system to place the page in the correct category
96+
97+
## Edit URLs
98+
99+
Each documentation page includes an "edit" button that links directly to the source file on GitHub. The `mkdocs-diracx-plugin` tracks which repository each file originates from and generates the correct edit URL, pointing to the appropriate repository and branch.
100+
101+
## Building Documentation Locally
102+
103+
To build and preview the documentation locally:
104+
105+
```bash
106+
pixi run mkdocs serve
107+
```
108+
109+
This will:
110+
111+
1. Aggregate documentation from all configured repositories
112+
2. Build the MkDocs site
113+
3. Start a local server with live reload
114+
115+
Visit `http://localhost:8000` to preview the documentation.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ nav:
157157
- Manage extensions: developer/manage_extension.md
158158
- Explanations:
159159
- dev/explanations/index.md
160+
- Documentation system: dev/explanations/documentation-system.md
160161
- Components:
161162
- dev/explanations/components/index.md
162163
- API: dev/explanations/components/api.md

0 commit comments

Comments
 (0)