Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ We recommend you use IntelliJ as your IDE. The code style template for the proje
* Use an assertion from Airlift's `Assertions` class if there is one that covers your case rather than writing the assertion by hand. Over time we may move over to more fluent assertions like AssertJ.
* When writing a Git commit message, follow these [guidelines](https://chris.beams.io/posts/git-commit/).

## Building the Documentation

To learn how to build the docs, see the [docs README](presto-docs/README.md).

## Building the Web UI

The Presto Web UI is composed of several React components and is written in JSX and ES6. This source code is compiled and packaged into browser-compatible Javascript, which is then checked in to the Presto source code (in the `dist` folder). You must have [Node.js](https://nodejs.org/en/download/) and [Yarn](https://yarnpkg.com/en/) installed to execute these commands. To update this folder after making changes, simply run:
Expand Down
40 changes: 40 additions & 0 deletions presto-docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Building the documentation

Presto documentation is authored in `rst` format and published using [Sphinx](https://www.sphinx-doc.org). The rst files are located in `presto-docs/src/main/sphinx` and sub-folders.

## Prerequisites

Building the presto-docs module requires Python3 with virtual environment. You can check if you have it installed by running:
```
python3 -m venv --help
```

To install venv:
```
python3 -m pip install --user virtualenv
```

## Building manually
The default build uses Apache Maven to download dependencies and generate the HTML. You can run it as follows:
```
cd presto-docs
mvn install
```
Or, to build the documentation more quickly:
```
cd presto-docs
./build
```
## Viewing the documentation
When 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.html
```
Or, you can start a web server e.g., using Python:
```
cd target/html/
python3 -m http.server
```
and open [http://localhost:8000](http://localhost:8000) in a web browser.