Write documentation
Via GitHub
The YunoHost documentation is managed through a Git repository.
If you are not familiar with GitHub, there is an "Edit" button at the bottom of each page that will redirect you to the GitHub online editor that will help you make change proposals (Pull Requests, PR).
However, if you are on an editing spree, you should fork the repository. You can then make all the commits (changes) you want on your forked repository, and submit them all at once in the same pull requests. GitHub's etiquette would advise you to gather in the same PR all related commits.
Because the online editor doesn't support uploading files, using Git is the prefered way if you need to upload media (e.g. images).
Docusaurus
The documentation is built using Docusaurus. It generates static pages that can be served by a simple server.
The official Docusaurus doc should be your primary source of documentation.
Install Docusaurus and its dependencies:
$ yarn
Local development
Start a local development server, that automatically updates when files are edited:
$ yarn start
Build
Build the final static files:
$ yarn build
This command generates static content into the build
directory.
You can serve those files locally using yarn serve
Deploy
You can either copy the built files to a static file server (using My Webapp) or deploy the site to Github Pages.
Contents of the repository
We are following the standard Docusaurus structure:
│ # The main docs
├── docs/
│
│ # The translations
├── i18n
│ ╰── *
│ ├── code.json
│ ├── docusaurus-theme-classic
│ │ ├── footer.json
│ │ ╰── navbar.json
│ ╰── docusaurus-plugin-content-docs
│ │ # The same content as docs/
│ ├── current/
│ ╰── current.json
│
│ # The configuration files
├── docusaurus.config.js
├── package.json
├── redirects.js
├── sidebars.js
├── yarn.lock
│
│ # Autogeneration scripts and templates
├── scripts
│ ╰── generate_docs.sh
│
│ # Custom Docusaurus code and theming
├── src
│ ├── components/
│ ├── css/
│ ╰── theme/
│
│ # Images, etc
╰── static/
Special pages
Some pages of the documentation are automatically or dynamically generated.
See the generation script.