2020-11-18 15:41:52 -05:00
# Armbian Documentation
2016-07-02 14:20:49 -04:00
2022-04-13 08:31:24 +02:00
[](https://github.com/armbian/documentation/actions/workflows/release.yaml)
2022-02-02 00:08:37 +01:00
2022-03-29 20:37:23 +08:00
<p align="center">
<a target="_blank" href="https://docs.armbian.com">
<img alt="logo" src="./docs/images/logo.png">
</a>
</p>
2020-11-18 15:41:52 -05:00
## Overview
2016-07-02 14:20:49 -04:00
2020-07-31 16:33:50 +02:00
Documentation is written in [markdown ](https://www.markdownguide.org/basic-syntax/ ) and stored in the `docs/` subfolder. Images go in `docs/images` .
2016-07-02 14:20:49 -04:00
2020-07-31 16:33:50 +02:00
This repo is meant for storing and quick glances. Official output is [https://docs.armbian.com ](https://docs.armbian.com ).
2016-07-02 14:20:49 -04:00
Armbian Documentation is available in the following formats:
2017-08-03 19:01:11 -05:00
2022-03-29 20:37:23 +08:00
* [Official document website ](https://docs.armbian.com ),
2022-05-26 13:58:44 +02:00
* [PDF document ](https://github.com/armbian/documentation/releases/latest )
2022-03-29 20:37:23 +08:00
## Contributing
This site is built with [mkdocs ](https://github.com/mkdocs/mkdocs/ ) and depends on [mkdocs-material ](https://github.com/squidfunk/mkdocs-material ).
2016-07-02 14:20:49 -04:00
2022-03-29 20:37:23 +08:00
Armbian Documentation naming of document files follows this rules:
2016-07-02 14:20:49 -04:00
2022-03-29 20:37:23 +08:00
`[Parent-Topic-Example]_[Child-Topic]-example.md`
2016-07-03 08:31:28 -04:00
2022-03-29 20:37:23 +08:00
`Parent-Topic-Name` and `Child-Topic-Name` are separated by an underscore `_` . Hyphens `-` are automatically converted to space.
2016-07-02 14:20:49 -04:00
2017-08-03 20:14:07 -05:00
Please try to avoid creating new parent topics unless absolutely necessary.
2016-07-02 14:20:49 -04:00
Current Parent Topics:
* User Guide
2020-07-31 16:33:50 +02:00
* Hardware notes
* Developer Guide
* Contributor Process
* Release management
* Community
2016-07-02 14:20:49 -04:00
2022-03-29 20:37:23 +08:00
See the [document template ](.github/DOCUMENT_TEMPLATE.md ) before you writing any content.
2016-07-02 14:20:49 -04:00
2022-03-29 20:37:23 +08:00
## Working on the content
2016-07-02 14:20:49 -04:00
2024-06-25 21:59:47 -07:00
### Prerequisites
Ensure you have Python and the necessary development packages installed:
```bash
sudo apt-get update
2025-01-26 21:54:22 +01:00
sudo apt-get install python3 python3-pip python3-venv python3.12-dev
2024-06-25 21:59:47 -07:00
```
2024-09-19 13:19:24 -04:00
If using Debian, you may need to install the following packages for `mkdocs-material` :
```bash
sudo apt-get install libcairo2 pango1.0-tools
```
2024-06-25 21:59:47 -07:00
### Cloning the Repository
Next, clone the Armbian documentation repository:
2022-03-29 20:37:23 +08:00
```bash
git clone https://github.com/armbian/documentation
2024-06-25 21:59:47 -07:00
cd documentation
2022-03-29 20:37:23 +08:00
```
2017-08-03 20:14:07 -05:00
2024-06-25 21:59:47 -07:00
### Setting Up the Environment
2017-08-03 20:14:07 -05:00
2024-06-25 21:59:47 -07:00
Set up a Python virtual environment to isolate the project dependencies:
2017-08-03 20:14:07 -05:00
2024-06-25 21:59:47 -07:00
```bash
2024-07-01 23:12:42 -07:00
python3 -m venv .venv
source .venv/bin/activate
2024-08-07 07:04:22 -05:00
pip install --use-pep517 -r requirements.txt
2024-06-25 21:59:47 -07:00
```
2017-08-03 20:14:07 -05:00
2024-06-25 21:59:47 -07:00
### Building and Serving the Documentation
To build and serve the documentation locally, allowing you to make edits and observe the results in real time, use:
```bash
2024-10-12 18:14:21 +02:00
mkdocs build --clean
mkdocs serve -a 0.0.0.0:8000
2024-06-25 21:59:47 -07:00
```
You will be able to make edits to existing files and observe the results in real time.
2017-08-03 20:14:07 -05:00
2022-03-29 20:37:23 +08:00
## Generate tools
2024-06-25 21:59:47 -07:00
After adding a new file, either hand-edit `mkdocs.yml` , or re-run `tools/mkArmbianDocs.py` **unless making changes to the structure of the `docs/` folder ** . (See below)
2016-07-02 14:20:49 -04:00
2020-11-18 15:41:52 -05:00
### mkArmbianDocs.py
2022-03-29 20:37:23 +08:00
Generate `mkdocs.yml` based on the contents of `docs/` folder
2017-08-03 20:14:07 -05:00
2022-03-29 20:37:23 +08:00
* Command-line options for input and output directories
* Requires install requirement
* You don't need to run it every time unless making changes to the structure of the `docs/` folder
* See `mkArmbianDocs.py -h` for help
2016-07-02 14:20:49 -04:00
From the parent folder of the repo, run:
2022-03-29 20:37:23 +08:00
`python3 tools/mkArmbianDocs.py && mkdocs build`
2016-07-02 14:20:49 -04:00
2022-03-29 20:37:23 +08:00
This will generate the `mkdocs.yml` and publish built HTML to the `site/` folder.