readme.md 1.75 KB
Newer Older
Xuqian Yan's avatar
Xuqian Yan committed
1
2
This documentation is shown on <https://nexus-e.readthedocs.io/en/latest/>.  

Xuqian Yan's avatar
Xuqian Yan committed
3
How to compile the whole documentation locally:
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
- (Only need to do it once) Create a python virtual environment for better python package management
	- Option 1: use [conda](https://conda.io/projects/conda/en/latest/index.html)
		- install conda following [this instruction](https://conda.io/projects/conda/en/latest/user-guide/install/index.html)
	    - `conda create -n nexuse-doc python=3.7` (you can change the "nexuse-doc" to any name for the virtual environment; the python version should be aligned with the version specified in [docs/.readthedocs.yml](https://gitlab.ethz.ch/nexus-e/nexuse-doc/-/blob/master/docs/.readthedocs.yml)) 
	    - `conda activate nexuse-doc`
		- `cd` to the "docs" folder of this repository
		- `pip install -r requirements.txt`
	- Option 2: use [virtualenv](https://uoa-eresearch.github.io/eresearch-cookbook/recipe/2014/11/26/python-virtual-env/)
		- `pip install virtualenv`
		- `cd` to the repository
		- `virtualenv -p python3.7 venv` (The python version should be aligned with the version specified in [docs/.readthedocs.yml](https://gitlab.ethz.ch/nexus-e/nexuse-doc/-/blob/master/docs/.readthedocs.yml).) 
		- (On Mac or Linux) `source venv/bin/activate` or (on Windows) `venv\Scripts\activate.bat`
		- `cd` to the "docs" folder of this repository
		- `pip install -r requirements.txt`
- Once you have created a virtual environment
	- Activate the virtual environment, with one of the following commands
		- (for conda environment) `conda activate nexuse-doc`
		- (for virtualenv on Mac or Linux) `source venv/bin/activate` 
		- (for virtualenv on Windows) `venv\Scripts\activate.bat`
	- `make html`
	- `open build/html/index.html`
	- Webpage will be shown in the browser