|
1 | | -# Architecture |
| 1 | +# Understanding Pulp Docs |
2 | 2 |
|
3 | | -The Pulp Docs tool is a python package that provides a cli named `pulp-docs`. |
4 | | -At it's core, it's an mkdocs plugin that extends from `mkdocs` cli by leveraging `click` composable features. |
| 3 | +This page explains some core design and concepts of the Pulp Docs tool. |
5 | 4 |
|
6 | | -At it's based of `mkdocs`, it uses it's event/hook system to perform various manipulations to the build process, |
7 | | -such as the selection of components to use, the construction of the navigation and the creation of dynamic pages. |
| 5 | +## Architecture |
8 | 6 |
|
9 | | -The aggregation system works over a specific set of Pulp components. |
10 | | -This set is defined in the `PulpDocs` plugin section of `mkdocs.yml` file, which contains the basic configuration required for it to be a member. |
| 7 | +The Pulp Docs tool is a python package that provides a cli, which we'll refer as `pulp-docs`. |
| 8 | +At it's core it's an mkdocs plugin, which we'll call *PulpDocs* from now on. |
| 9 | +Also, it extends from `mkdocs` cli by leveraging `click` composable features. |
11 | 10 |
|
12 | | -With this set in place. |
13 | | -To perform the aggregation, the `mkdocs.yml` specifies which Pulp components are considered members |
| 11 | +The main configuration file for the system is the Pulp Docs's `mkdocs.yml` file, which is the mkdocs entrypoint. |
| 12 | +Through that, the *PulpDocs* plugin is registered and can act on the building process to perform various interventions, like the selection of components to use, the construction of the navigation and the creation of dynamic pages. |
| 13 | +The main mechanism used for such interventions is the mkdocs's event/hook API. |
14 | 14 |
|
15 | | -## Further Reading |
| 15 | +As mentioned, the `pulp-docs` cli extends `mkdocs` cli. |
| 16 | +The extra features it provides are also based on the PulpDocs plugin definition in the `mkdocs.yml`. |
| 17 | + |
| 18 | +To be an effective part of the PulpDocs website, a component must satisfy two requirements: |
| 19 | + |
| 20 | +1. Be registered as a *PulpDocs* component in the `mkdocs.yml` |
| 21 | +1. Contain `docs/` directory following the [Pulp Docs Content Structure](#pulp-docs-content-structure) |
| 22 | + |
| 23 | +The registration is centralized and it includes essential information of a component, like how to fetch it, what kind of component it is and how to display it's name. |
| 24 | + |
| 25 | +## Pulp Docs Content Structure |
| 26 | + |
| 27 | +The structure is based on Diataxis principles, where content is supposed to satisfy a specific [Persona](#persona) on one of the [Basic User Needs](#basic-user-needs). |
| 28 | +Although not Diataxis doesn't enforce a specific structure, currently *PulpDocs* requires content to fit into a strict directory tree. |
16 | 29 |
|
17 | | -- [Mkdocs Plugins](https://www.mkdocs.org/dev-guide/plugins/#developing-plugins>) - Mkdocs Plugin system is the backbone of Pulp Docs. |
| 30 | +This structure is used for building the navigation. |
| 31 | + |
| 32 | +```bash |
| 33 | +docs/ |
| 34 | + user/ |
| 35 | + guides/ |
| 36 | + learn/ |
| 37 | + reference/ |
| 38 | + tutorials/ |
| 39 | + admin/ |
| 40 | + guides/ |
| 41 | + learn/ |
| 42 | + reference/ |
| 43 | + tutorials/ |
| 44 | + dev/ |
| 45 | + guides/ |
| 46 | + learn/ |
| 47 | + reference/ |
| 48 | + tutorials/ |
| 49 | +``` |
| 50 | + |
| 51 | +## Concepts |
| 52 | + |
| 53 | +* <a id="pulpdocs-plugin" href="#pulpdocs-plugin">PulpDocs</a>: The Pulp Docs mkdocs plugin. |
| 54 | +* <a id="persona" href="#persona">Persona</a>: A theoretical user with a specific set of needs. |
| 55 | +* <a id="basic-user-needs" href="#basic-user-needs">Basic User Needs</a>: The 4 categories that expresses the need of aquisition/application of skills and the cognition/action aspect of that need: Tutorial, How-To-Guide, Explanation, Reference. See <https://diataxis.fr/compass/>. |
| 56 | + |
| 57 | +## Further Reading |
18 | 58 |
|
| 59 | +- [Mkdocs Plugins](https://www.mkdocs.org/dev-guide/plugins/#developing-plugins>) - Understand how an Mkdocs Plugin plugin work. |
| 60 | +- [Diataxis](https://diataxis.fr/start-here/) - Understand the underlying principles for organizing content |
| 61 | +- [The new Pulp "Unified Docs"](https://hackmd.io/eE3kG8qhT9eohRYbtooNww?view) - Original design document for this project |
0 commit comments