Skip to content

Commit 272864e

Browse files
milancurcicawvwgkivan-pi
authored
Expand README and add pip instructions (#26)
- add pip instructions - expand build instructions - describe dependencies Co-authored-by: Sebastian Ehlert <[email protected]> Co-authored-by: Ivan Pribec <[email protected]>
1 parent 8b666e1 commit 272864e

File tree

2 files changed

+48
-2
lines changed

2 files changed

+48
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/_*
22
*.mo
3+
/venv/

README.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,62 @@
33
Repository for building the documentation pages for the Fortran package manager (fpm).
44

55

6-
## Building
6+
## Getting started
77

8-
This project is built with *sphinx* to install the required dependencies use
8+
### Get the code
9+
10+
```
11+
git clone https://github.com/fortran-lang/fpm-docs
12+
cd fpm-docs
13+
```
14+
15+
### Install dependencies
16+
17+
The documentation pages are created using [sphinx](https://www.sphinx-doc.org).
18+
You first need to install the required dependencies using conda or pip.
19+
This project uses
20+
21+
- [sphinx-build](https://www.sphinx-doc.org) for building the pages
22+
- [sphinx-intl](https://www.sphinx-doc.org/en/master/usage/advanced/intl.html) for translations
23+
- [ablog](https://ablog.readthedocs.io/en/latest/) for the news section and posts
24+
- [sphinx-book-theme](https://sphinx-book-theme.readthedocs.io/en/latest/) for the page theme
25+
- [myst-parser](https://myst-parser.readthedocs.io/en/latest/) for markdown support
26+
- [sphinx-design](https://sphinx-design.readthedocs.io/en/latest/) for the bootstrap building blocks
27+
- [sphinx-copybutton](https://sphinx-copybutton.readthedocs.io/en/latest/) to allow copying of code-blocks
28+
29+
#### conda
930

1031
```
1132
conda env create -n sphinx -f environment.yaml
1233
conda activate sphinx
1334
```
1435

36+
#### pip
37+
38+
```
39+
python3 -m venv venv
40+
source venv/bin/activate
41+
pip install -U pip
42+
pip install -r requirements.txt
43+
```
44+
45+
### Build fpm-docs
46+
1547
Build the documentation by invoking
1648

1749
```
1850
make html
1951
```
52+
53+
The website will be built in `_build/html` and can be previewed by opening the page with a browser (*e.g.* firefox, chromium or similar):
54+
55+
```
56+
firefox file://$PWD/_build/html/index.html
57+
```
58+
59+
By default all languages will be built.
60+
To limit the build to a single language subtree, *i.e.* English, use
61+
62+
```
63+
make html LANGUAGES=en
64+
```

0 commit comments

Comments
 (0)