|
1 | | -# docs |
2 | | -All Pydio Documentation |
| 1 | +# Pydio Docs Repository Structure |
| 2 | +The Pydio documentation repository is organized into multiple branches and components for managing and building documentation. |
| 3 | + |
| 4 | +# Main Branch |
| 5 | +The main branch contains the MkDocs configuration, tools, and utilities to convert and aggregate documents. |
| 6 | + |
| 7 | +## MkDocs Materials |
| 8 | +* overrides/ |
| 9 | +* resources/ |
| 10 | +* mkdocs.yml |
| 11 | +* requirements.txt |
| 12 | +* resources/versions.json: We use Mike to deploy multiple versions of the docs. |
| 13 | +Mike generates versions.json automatically; however, we maintain resources/versions.json to manually control versions and their labels. |
| 14 | + |
| 15 | +This file overrides the Mike-generated versions.json. |
| 16 | + |
| 17 | +## Document Conversion Tools |
| 18 | +Located under the tools/ directory, these scripts handle the migration and aggregation of legacy documents from multiple repositories into a unified structure. |
| 19 | + |
| 20 | +### git_script.sh |
| 21 | + |
| 22 | +#### Prerequisites |
| 23 | +Before running the script, clone the legacy repositories locally to: |
| 24 | + |
| 25 | +``` |
| 26 | +LOCAL_REPO_ADMIN_GUIDE="/home/pydio/go/src/github.com/pydio/pydio-doc-admin-guide" |
| 27 | +LOCAL_REPO_DEVELOPER_GUIDE="/home/pydio/go/src/github.com/pydio/pydio-doc-developer-guide" |
| 28 | +LOCAL_REPO_KB="/home/pydio/go/src/github.com/pydio/pydio-doc-howto" |
| 29 | +``` |
| 30 | + |
| 31 | +#### Functionality |
| 32 | +`git_script.sh` scans these repositories across their respective branches and performs: |
| 33 | + |
| 34 | +* Adds .nav.yaml files to each folder, containing frontmatter (slug, title, etc.). |
| 35 | +* Inserts frontmatter metadata into each .md file: |
| 36 | +* title, slug, weight (used to order pages). |
| 37 | +* Fixes image links within .md files. |
| 38 | +* Replaces [:summary] placeholders with actual section TOCs. |
| 39 | + |
| 40 | + |
| 41 | +### local-build.sh |
| 42 | +This script is used for local builds of the documentation using MkDocs and Mike. |
| 43 | + |
| 44 | +#### Mkdocs plugins build/setup |
| 45 | + |
| 46 | +Setup a clean python env |
| 47 | + |
| 48 | +``` |
| 49 | +python -m venv /home/pydio/.venv |
| 50 | +``` |
| 51 | + |
| 52 | +Propagate python Envs |
| 53 | + |
| 54 | +``` |
| 55 | +source /home/pydio/.venv/bin/activate |
| 56 | +``` |
| 57 | + |
| 58 | +pip install mkdocs mike |
| 59 | +pip install mkdocs-material mkdocs-redirects mkdocs-minify-plugin pymdown-extensions mkdocs-glightbox |
| 60 | + |
| 61 | +Install specific mkdocs plugin |
| 62 | + |
| 63 | +``` |
| 64 | +pip install git+https://github.com/pydio/mkdocs-awesome-nav |
| 65 | +``` |
| 66 | + |
| 67 | +`pydio/mkdocs-awesome-nav` is an specific plugin enabling following features: |
| 68 | +- Understand the frontmatter of .md files such as title, slug, weight |
| 69 | +- Understand the .nav.yaml of each section for menu & navigation bar |
| 70 | + |
| 71 | +For example: |
| 72 | + |
| 73 | +**Frontmatter:** |
| 74 | + |
| 75 | +``` |
| 76 | +--- |
| 77 | +slug: install-static-binaries |
| 78 | +title: Install Static Binaries |
| 79 | +description: Installing Pydio Cells on your server using our pre-compiled binaries. |
| 80 | +menu: Static Binaries |
| 81 | +language: und |
| 82 | +weight: 1 |
| 83 | +menu_name: menu-admin-guide-v7-enterprise |
| 84 | +
|
| 85 | +--- |
| 86 | +Page content |
| 87 | +
|
| 88 | +``` |
| 89 | + |
| 90 | +**.nav.yaml:** |
| 91 | + |
| 92 | +``` |
| 93 | +title: Quick Start |
| 94 | +abstract: This section provides a full-spectrum overview of Pydio Cells installation, configuration and usage. |
| 95 | +menu: Quick Start |
| 96 | +language: und |
| 97 | +weight: 1 |
| 98 | +menu_name: menu-admin-guide-v7-enterprise |
| 99 | +
|
| 100 | +slug: quick-start |
| 101 | +``` |
| 102 | + |
| 103 | +## Document Branches |
| 104 | +The actual documentation contents are stored in version-specific branches: |
| 105 | + |
| 106 | +* cells-v5 |
| 107 | + |
| 108 | +* cells-v4 (latest) |
| 109 | + |
| 110 | +* pydio-v8 |
| 111 | + |
| 112 | +Each branch contains its own GitHub workflow file: |
| 113 | + |
| 114 | +`.github/workflows/build-docs.yml` — triggers the documentation rebuild on push events. |
| 115 | + |
| 116 | + |
| 117 | +## Artifact Branch |
| 118 | + |
| 119 | +* gh-pages |
| 120 | + |
| 121 | +GitHub Actions use MkDocs and Mike to build the documentation and store the resulting artifacts in this branch. |
| 122 | + |
| 123 | +A separate GitHub Pages workflow listens to changes on gh-pages and triggers the website update process. |
| 124 | + |
| 125 | +Live Documentation: https://pydio.github.io/docs |
0 commit comments