| myst | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
(setup-build-label)=
This document covers how to build the Plone Documentation and check it for quality.
(setup-build-installation-label)=
Install Enchant to check spelling.
macOS
brew install enchantUbuntu
sudo apt-get install enchantClone the Plone Documentation repository, and change your working directory into the cloned project.
Then with a single command using Makefile, create a Python virtual environment, install project dependencies, pull in Volto documentation as a git submodule, build the docs, and view the results in a web browser by opening /_build/html/index.html.
git clone https://github.com/plone/documentation.git
cd documentation
make htmlIf you are using an M1 Mac to build the documentation, there is currently [an issue with pyenchant](https://github.com/pyenchant/pyenchant/issues/265) that throws an error that the enchant library can't be found.
This happens for example if you install Python 3 with `pyenv` in the default M1 architecture (aarch64), so without following instructions to use Rosetta2 x86 emulation.
A workaround until pyenchant is fixed is to run `export PYENCHANT_LIBRARY_PATH=/opt/homebrew/lib/libenchant-2.dylib` in the terminal session before you execute `make html`.
(setup-build-available-documentation-builds-label)=
All build and check documentation commands use the file Makefile.
To see the most frequently used builds, use the following command.
make helpElse you can open Makefile to see other build formats, including PDF.
html is the HTML version of the documentation.
make htmlOpen /_build/html/index.html in a web browser.
livehtml rebuilds Sphinx documentation on changes, with live-reload in the browser.
make livehtmlOpen http://0.0.0.0:8000/ in a web browser.
linkcheck checks all links.
See {ref}authors-linkcheck-label for configuration.
make linkcheckOpen /_build/linkcheck/output.txt for a list of broken links.
spellcheck checks the spelling of words.
See {ref}authors-english-label for configuration.
make spellcheckOpen /_build/spellcheck/ for misspellings.
html_meta adds a meta data section to each chapter if missing.
See {ref}authors-html-meta-data-label for more info.
make html_meta