Presto documentation is authored in rst format and published using Sphinx. The rst files are located in presto-docs/src/main/sphinx and sub-folders.
Building the presto-docs module requires Python3 with virtual environment. You can check if you have it installed by running:
python3 -m venv --helpTo install venv:
python3 -m pip install --user virtualenvOptionally, the PDF version of presto-docs requires LaTeX tooling.
For MacOS,
brew install --cask mactexFor Ubuntu,
sudo apt-get update
sudo apt-get install -y texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra latexmk tex-gyre texlive-xetex fonts-freefont-otf xindyThe default build uses Apache Maven to download dependencies and generate the HTML. You can run it as follows:
cd presto-docs
mvn installOr, to build the documentation more quickly:
cd presto-docs
./buildTo build PDF version of the documentation
cd presto-docs
./build --with-pdfWhen the build is complete, you'll find the output HTML files in the target/html/ folder.
To view the docs, you can open the file target/html/index.html in a web browser on macOS with
open target/html/index.htmlOr, you can start a web server e.g., using Python:
cd target/html/
python3 -m http.serverand open http://localhost:8000 in a web browser.