|
1 | 1 | # Tabletop Simulator API
|
2 | 2 |
|
3 |
| -This is the source of the api documentation in Tabletop Simulator. It uses a modified version of [Material-Design](https://github.com/squidfunk/mkdocs-material) for MKDocs. |
| 3 | +This is the source of the api documentation in Tabletop Simulator. It uses a modified version of [Material-Design](https://github.com/squidfunk/mkdocs-material) for MkDocs. |
4 | 4 |
|
5 | 5 | ## How it Works
|
6 | 6 |
|
7 | 7 | The `.md` files in the `/docs` folder are written in Markdown, which is an easy-to-use markup language to add formatting to text. Additionally, some custom CSS is used, as well as a handful of custom images. When making changes, it is possible to live-preview them as you go if you have set up the local files for mkdocs + material design.
|
8 | 8 |
|
9 | 9 | Alternatively, you can make modifications to individual pages then submit them for review. The developers will always be the ones to build and publish the site anyway, all you will do is modify the contents of this Git.
|
10 | 10 |
|
11 |
| -### Installing |
| 11 | +## Contributing |
12 | 12 |
|
13 |
| -If you choose to install MKDocs so you can live-preview your changes, you may do so [by following these instructions](https://squidfunk.github.io/mkdocs-material/getting-started/). |
| 13 | +The API website is built using [MkDocs](https://www.mkdocs.org/) and several related extensions. |
14 | 14 |
|
15 |
| -Otherwise, you will not need to install anything to edit the text files. |
| 15 | +Pull requests are welcome, however in order to preview your changes, you must follow the instructions below: |
| 16 | + |
| 17 | +### Prerequisites |
| 18 | + |
| 19 | +You will need to ensure Python `3.6` is installed on your system. |
| 20 | + |
| 21 | +If your system doesn't have it installed, you can either [download directly](https://www.python.org/downloads/release/python-366/) or install from a Python version manager such as [pyenv](https://github.com/pyenv/pyenv). |
| 22 | + |
| 23 | +We utilise Pipenv and a `Pipfile` to ensure builds are consistent. If you don't already have Pipenv installed, please follow the official [pipenv install instructions](https://pipenv.readthedocs.io/en/latest/install/#installing-pipenv) for you platform. |
| 24 | + |
| 25 | +### Installing Dependencies |
| 26 | + |
| 27 | +Once've you installed the prerequisites, you must initialize your environment. From command line, this is done with: |
| 28 | + |
| 29 | +``` |
| 30 | +pipenv install |
| 31 | +``` |
| 32 | + |
| 33 | +You can then "activate" this environment with: |
| 34 | + |
| 35 | +``` |
| 36 | +pipenv shell |
| 37 | +``` |
| 38 | + |
| 39 | +### Previewing |
| 40 | + |
| 41 | +Once your Pipenv environment is activated, you can simply execute: |
| 42 | + |
| 43 | +``` |
| 44 | +mkdocs serve |
| 45 | +``` |
| 46 | + |
| 47 | +Then open your browser and navigate to `http://localhost:8000` in order to view your changes. |
0 commit comments