Skip to content

Commit e44795a

Browse files
committed
Update docs about how Pulp Docs work
1 parent c615691 commit e44795a

File tree

3 files changed

+59
-21
lines changed

3 files changed

+59
-21
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ It leverages mkdocs plugin system to build and publish a single website from a v
66
Here are some useful resources to help you get started:
77

88
* [Basic Installation and Usage](https://pulpproject.org/pulp-docs/docs/dev/tutorials/getting-started/)
9-
* [Pulp Docs Architecture](https://pulpproject.org/pulp-docs/docs/dev/reference/architecture/)
9+
* [Understanding Pulp Docs](https://pulpproject.org/pulp-docs/docs/dev/reference/architecture/)
1010
* [Mkdocs/Markdown Cheatsheet](https://pulpproject.org/pulp-docs/docs/dev/reference/markdown-cheatsheet/)
11-

docs/dev/index.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
# Overview
1+
# Welcome to Pulp Docs
22

3-
Pulp-Docs is a tool for serving and building the Pulp Project documentation
4-
(see [The new Pulp "Unified Docs"](https://hackmd.io/eE3kG8qhT9eohRYbtooNww?view)).
3+
Pulp-Docs is a tool for serving, building and publishing the Pulp Project documentation.
54

6-
The idea is that after installing `pulp-docs`, you'll imediatelly be able run the unified website and preview local changes as they will appear in this site.
7-
Also, this is used for the production build.
8-
9-
To start using it, see the [Getting Started](site:pulp-docs/docs/dev/tutorials/getting-started/) section.
10-
Before contributing, we recommend reading about the [Architecture](site:pulp-docs/docs/dev/reference/architecture/).
5+
See the [Getting Started](site:pulp-docs/docs/dev/tutorials/getting-started/) section to learn how setup and use `pulp-docs` cli in your development workflow.
6+
If you want to contribute or simply understand how it works, we recommend reading the article [Understanding Pulp Docs](site:pulp-docs/docs/dev/reference/architecture/).

docs/dev/reference/architecture.md

Lines changed: 54 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,61 @@
1-
# Architecture
1+
# Understanding Pulp Docs
22

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.
54

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
86

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.
1110

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.
1414

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.
1629

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
1858

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

Comments
 (0)