zfsbootmenu/docs
Andrew J. Hesford d3b05de19a Add description of deliberative process 2023-01-17 10:54:22 -05:00
..
_static migrate README contents to docs/index.rst 2022-12-22 10:24:47 -06:00
guides docs/guides/opensuse/: Initial Leap 15.4 guide 2023-01-15 13:05:02 -06:00
logos docs: add text-only logo, use on index page 2022-12-22 11:10:44 -06:00
man zbm-kcl, zbm-efi-kcl: unify, allow streaming EFI modifications 2023-01-13 22:20:50 -05:00
online docs/online/*.rst: fix permissions 2022-12-21 21:22:58 -05:00
.editorconfig docs/: add sphinx & rtd boilerplate 2022-12-20 21:53:42 -06:00
CHANGELOG.md docs/: make linkcheck pass 2022-12-29 10:55:10 -05:00
Makefile docs/guides/: DRY and guide stage normalization 2023-01-10 19:25:05 -06:00
README.md docs/README.md: note _include/ differences 2023-01-01 14:18:06 -06:00
conf.py Add description of deliberative process 2023-01-17 10:54:22 -05:00
deliberation.rst Add description of deliberative process 2023-01-17 10:54:22 -05:00
index.rst docs/guides/opensuse/: Initial Leap 15.4 guide 2023-01-15 13:05:02 -06:00
media migrate README contents to docs/index.rst 2022-12-22 10:24:47 -06:00
requirements.txt docs/guides/: DRY and guide stage normalization 2023-01-10 19:25:05 -06:00

README.md

ZFSBootMenu Documentation

This document gives an overview of how the Sphinx documentation for ZFSBootMenu works.

Building

The Makefile alongside this document provides several targets to prepare the Sphinx environment and render documentation.

Prerequisites

Python 3 and several Python 3 packages are needed:

  • rst2ansi
  • sphinx
  • sphinx-tabs
  • sphinx_rtd_theme
  • recommonmark

On Void Linux, these can be installed with make setup-void. Otherwise, these packages can be installed through your system package manager or via pip in a virtual environment with make setup.

If using the virtual environment method, you will then need to activate this environment with source env/bin/activate (may be different for some shells) before running a build command.

Generating Documentation

Generally, the commands to build the documentation are make html (to build the web documentation) and make man (to build the manpages).

Several special targets exist too. make serve can be used to build and locally serve the web documentation using Python's built-in webserver. make gen-man can be used to build the manpages and update them in /docs/man/dist.

See make help for a list of all possible targets.

Organisation

  • conf.py: the Sphinx configuration file
  • index.rst: the main page, and where the primary toctrees are listed
  • CHANGELOG.md: the changelog for ZFSBootMenu
  • guides: where most documentation should reside. Documents about various topics, including installation on various distros and various configuration options
    • guides/_include/ contains distribution agonostic snippets
    • guides/distro/_include/ contains distribution specific snippets
  • man: manpages
  • online: documentation primarily to be shown within ZFSBootMenu's help system
  • logos: various versions of the ZFSBootMenu logo
  • _static: various static files for use within the documentation

Formatting

  • Most pages are written in reStructuredText (RST) format
  • Some (like the changelog) are written in markdown for compatibility, so markdown is supported but RST is preferred
  • When possible, keep lines limited to 120 characters, and use 2 spaces for indentation

To link to files within the ZFSBootMenu repository, use the :zbm: macro:

:zbm:`title <bin/generate-zbm>`
:zbm:`bin/generate-zbm`

will both create a link to the file /bin/generate-zbm on GitHub.

Headings

reStructuredText allows various forms of section heading syntax. In this documentation, use:

Level 1:

My Title
========

Level 2:

My Title
--------

Level 3:

My Title
~~~~~~~~

Level 4:

My Title
^^^^^^^^

Also, the number of characters in the underline should match the number of characters in the title.

Resources

To get a good overview of reStructuredText and Sphinx, take a look at the following resources: