Skip to content

Commit 9aa7388

Browse files
authored
update doc tooling to Zensical (#223)
* update doc tooling to Zensical * remove termy * match pygeoapi theming
1 parent 1a54144 commit 9aa7388

37 files changed

Lines changed: 166 additions & 1073 deletions

.github/workflows/deploy.docs.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,34 @@ on:
77
paths:
88
- 'workshop/content/**'
99

10-
defaults:
11-
run:
12-
working-directory: workshop/content
13-
1410
jobs:
1511
build:
1612
name: Build and Deploy Documentation
1713
runs-on: ubuntu-latest
1814
steps:
19-
- uses: actions/checkout@v2
20-
- uses: actions/setup-python@v2
15+
- uses: actions/checkout@master
16+
- uses: actions/setup-python@v5
2117
with:
2218
python-version: '3.x'
2319
- name: Install requirements 📦
2420
run: |
2521
python -m pip install --upgrade pip
26-
pip install -r requirements.txt
27-
- name: Deploy 📦
28-
run: mkdocs gh-deploy --config-file mkdocs.yml --strict --force --clean --message 'update website via GitHub Actions'
22+
pip install -r workshop/content/requirements.txt
23+
- name: Build site 📦
24+
run: |
25+
zensical build --clean --strict
26+
mv site /tmp/
27+
- name: checkout gh-pages branch
28+
uses: actions/checkout@master
29+
with:
30+
ref: gh-pages
31+
- name: Deploy to GitHub Pages 📦
32+
run: |
33+
git checkout gh-pages
34+
git config --global user.email "tomkralidis@gmail.com"
35+
git config --global user.name "Tom Kralidis"
36+
ls | grep -v ".nojekyll"| xargs rm -fr
37+
mv -f /tmp/site/* .
38+
git add .
39+
git commit -am "update website via GitHub Actions"
40+
git push

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
name: Test documentation build
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v2
18-
- uses: actions/setup-python@v2
17+
- uses: actions/checkout@master
18+
- uses: actions/setup-python@v5
1919
with:
2020
python-version: '3.x'
2121
- name: Install requirements 📦
2222
run: |
2323
python -m pip install --upgrade pip
2424
pip install -r requirements.txt
25-
- name: Deploy 📦
26-
run: mkdocs build --strict
25+
- name: Build 📦
26+
run: zensical build --clean --strict

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.DS_Store
22
workshop/exercises/data/tiles
3+
workshop/content/.cache
34
workshop/content/site
45

56
.idea
6-
.venv
7+
.venv

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Your contribution will be under our [license](https://github.com/geopython/divin
9292
### Documentation
9393

9494
* documentation is managed in `workshop/content/docs/` using , in Markdown format
95-
* [MkDocs](https://www.mkdocs.org) is used to generate the documentation
95+
* [Zensical](https://zensical.org) is used to generate the documentation
9696

9797

9898
## Suggesting Enhancements

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ the [Workshop environment setup](https://dive.pygeoapi.io/setup).
2222

2323
### Building the workshop content locally
2424

25-
The workshop manual is powered by [MkDocs](https://www.mkdocs.org) which facilitates easy management
25+
The workshop manual is powered by [Zensical](https://zensical.org) which facilitates easy management
2626
of content and publishing. Workshop content is written in Markdown.
2727

2828

@@ -38,9 +38,9 @@ cd diving-into-pygeoapi/workshop/content
3838
# install required dependencies
3939
pip install -r requirements.txt
4040
# build the website
41-
mkdocs build
41+
zensical build
4242
# serve locally
43-
mkdocs serve # website is made available on http://localhost:8000
43+
zensical serve # website is made available on http://localhost:8000
4444
```
4545

4646
### Translating the workshop to a different language
@@ -71,10 +71,4 @@ Changes to the GitHub repository result in an automated build and deploy of the
7171

7272
## Deploying to live site
7373

74-
Website updates are automatically published via GitHub Actions. To publish manually:
75-
76-
```bash
77-
# NOTE: you require access privileges to the GitHub repository
78-
# to publish live updates
79-
mkdocs gh-deploy -m 'add new page on topic x'
80-
```
74+
Website updates are automatically published via GitHub Actions.

workshop/content/docs/advanced/cloud.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,15 @@ A [Docker image](https://hub.docker.com/r/geopython/pygeoapi) is available for p
1414

1515
=== "Linux/Mac"
1616

17-
<div class="termy">
1817
```bash
1918
docker run -p 5000:80 geopython/pygeoapi:latest
2019
```
21-
</div>
2220

2321
=== "Windows (PowerShell)"
2422

25-
<div class="termy">
2623
```bash
2724
docker run -p 5000:80 geopython/pygeoapi:latest
2825
```
29-
</div>
3026

3127
!!! question "Review the pygeoapi Dockerfile"
3228

@@ -38,22 +34,17 @@ In a typical configuration one would override the default pygeoapi configuration
3834

3935
=== "Linux/Mac"
4036

41-
<div class="termy">
4237
```bash
4338
docker run -p 5000:80 \
4439
-v $(pwd)/pygeoapi-config.yml:/pygeoapi/local.config.yml \
4540
-v $(pwd)/geodata:/geodata https://hub.docker.com/r/geopython/pygeoapi:latest
4641
```
47-
</div>
4842

4943
=== "Windows (PowerShell)"
5044

51-
<div class="termy">
5245
```bash
5346
docker run -p 5000:80 -v ${pwd}/pygeoapi-config.yml:/pygeoapi/local.config.yml -v ${pwd}/geodata:/geodata https://hub.docker.com/r/geopython/pygeoapi:latest
5447
```
55-
</div>
56-
5748

5849
Alternatively, you can build a fresh Docker image including both the configuration and data for the service.
5950

@@ -70,22 +61,18 @@ set the `SCRIPT_NAME` environment variable.
7061

7162
=== "Linux/Mac"
7263

73-
<div class="termy">
7464
```bash
7565
docker run -p 5000:80 -e SCRIPT_NAME='/mypygeoapi' \
7666
-v $(pwd)/my.config.yml:/pygeoapi/local.config.yml -it geopython/pygeoapi
7767
# browse to http://localhost:5000/mypygeoapi
7868
```
79-
</div>
8069

8170
=== "Windows (PowerShell)"
8271

83-
<div class="termy">
8472
```bash
8573
docker run -p 5000:80 -e SCRIPT_NAME='/mypygeoapi' -v ${pwd}/my.config.yml:/pygeoapi/local.config.yml -it geopython/pygeoapi
8674
# browse to http://localhost:5000/mypygeoapi
8775
```
88-
</div>
8976

9077
# Summary
9178

workshop/content/docs/advanced/cloud.pt.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,15 @@ Uma [imagem Docker](https://hub.docker.com/r/geopython/pygeoapi) está disponív
1414

1515
=== "Linux/Mac"
1616

17-
<div class="termy">
1817
```bash
1918
docker run -p 5000:80 geopython/pygeoapi:latest
2019
```
21-
</div>
2220

2321
=== "Windows (PowerShell)"
2422

25-
<div class="termy">
2623
```bash
2724
docker run -p 5000:80 geopython/pygeoapi:latest
2825
```
29-
</div>
3026

3127
!!! question "Rever o Dockerfile da pygeoapi"
3228

@@ -38,21 +34,17 @@ Numa configuração típica, substituir-se-ia o ficheiro de configuração padr
3834

3935
=== "Linux/Mac"
4036

41-
<div class="termy">
4237
```bash
4338
docker run -p 5000:80 \
4439
-v $(pwd)/pygeoapi-config.yml:/pygeoapi/local.config.yml \
4540
-v $(pwd)/geodata:/geodata https://hub.docker.com/r/geopython/pygeoapi:latest
4641
```
47-
</div>
4842

4943
=== "Windows (PowerShell)"
5044

51-
<div class="termy">
5245
```bash
5346
docker run -p 5000:80 -v ${pwd}/pygeoapi-config.yml:/pygeoapi/local.config.yml -v ${pwd}/geodata:/geodata https://hub.docker.com/r/geopython/pygeoapi:latest
5447
```
55-
</div>
5648

5749

5850
Alternativamente, pode construir uma nova imagem Docker incluindo tanto a configuração como os dados para o serviço.
@@ -70,23 +62,19 @@ definir a variável de ambiente `SCRIPT_NAME`.
7062

7163
=== "Linux/Mac"
7264

73-
<div class="termy">
7465
```bash
7566
docker run -p 5000:80 -e SCRIPT_NAME='/mypygeoapi' \
7667
-v $(pwd)/my.config.yml:/pygeoapi/local.config.yml -it geopython/pygeoapi
7768
# navegue para http://localhost:5000/mypygeoapi
7869
```
79-
</div>
8070

8171
=== "Windows (PowerShell)"
8272

83-
<div class="termy">
8473
```bash
8574
docker run -p 5000:80 -e SCRIPT_NAME='/mypygeoapi' -v ${pwd}/my.config.yml:/pygeoapi/local.config.yml -it geopython/pygeoapi
8675
# navegue para http://localhost:5000/mypygeoapi
8776
```
88-
</div>
8977

9078
# Resumo
9179

92-
Parabéns! Agora pode implementar a pygeoapi como um serviço cloud native.
80+
Parabéns! Agora pode implementar a pygeoapi como um serviço cloud native.

workshop/content/docs/advanced/i18n.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,37 +52,29 @@ Babel provides a utility which extracts all keys to be translated from the templ
5252

5353
=== "Linux/Mac"
5454

55-
<div class="termy">
5655
```bash
5756
pybabel extract -F babel-mapping.ini -o locale/messages.pot ./
5857
```
59-
</div>
6058

6159
=== "Windows (PowerShell)"
6260

63-
<div class="termy">
6461
```bash
6562
pybabel extract -F babel-mapping.ini -o locale/messages.pot ./
6663
```
67-
</div>
6864

6965
The resulting `.pot` file is used to create or update existing `.po` files, which exist for each language, containing the actual translations.
7066

7167
=== "Linux/Mac"
7268

73-
<div class="termy">
7469
```bash
7570
pybabel init -d locale -l it -i locale/messages.pot
7671
```
77-
</div>
7872

7973
=== "Windows (PowerShell)"
8074

81-
<div class="termy">
8275
```bash
8376
pybabel init -d locale -l it -i locale/messages.pot
8477
```
85-
</div>
8678

8779
The `.po` files are stored in pygeoapi's source code repository on GitHub. You can create a Pull Request to add or update your favourite languages. `.po` files can also be added to translation software such as [transifex.com](https://transifex.com).
8880

workshop/content/docs/advanced/i18n.pt.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,37 +52,29 @@ O Babel fornece um utilitário que extrai todas as chaves a serem traduzidas dos
5252

5353
=== "Linux/Mac"
5454

55-
<div class="termy">
5655
```bash
5756
pybabel extract -F babel-mapping.ini -o locale/messages.pot ./
5857
```
59-
</div>
6058

6159
=== "Windows (PowerShell)"
6260

63-
<div class="termy">
6461
```bash
6562
pybabel extract -F babel-mapping.ini -o locale/messages.pot ./
6663
```
67-
</div>
6864

6965
O ficheiro `.pot` resultante é usado para criar ou atualizar ficheiros `.po` existentes, que existem para cada língua, contendo as traduções atuais.
7066

7167
=== "Linux/Mac"
7268

73-
<div class="termy">
7469
```bash
7570
pybabel init -d locale -l it -i locale/messages.pot
7671
```
77-
</div>
7872

7973
=== "Windows (PowerShell)"
8074

81-
<div class="termy">
8275
```bash
8376
pybabel init -d locale -l it -i locale/messages.pot
8477
```
85-
</div>
8678

8779
Os ficheiros `.po` são armazenados no repositório de código fonte da pygeoapi no GitHub. Pode criar um Pull Request para adicionar ou atualizar as suas linguagens favoritas. Os ficheiros `.po` também podem ser adicionados a software de tradução como [transifex.com](https://transifex.com).
8880

@@ -111,4 +103,4 @@ A pygeoapi inclui um mecanismo para influenciar as respostas da API baseado na l
111103

112104
# Resumo
113105

114-
Parabéns! Personalizámos a pygeoapi para suportar múltiplas línguas.
106+
Parabéns! Personalizámos a pygeoapi para suportar múltiplas línguas.

workshop/content/docs/advanced/inspire.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,15 @@ recommendation and the relevant Good Practices.
5454

5555
=== "Linux/Mac"
5656

57-
<div class="termy">
5857
```bash
5958
python3 load_tinydb_records.py <path/to/xml-files> <output.db>
6059
```
61-
</div>
6260

6361
=== "Windows (PowerShell)"
6462

65-
<div class="termy">
6663
```bash
6764
python3 load_tinydb_records.py <path/to/xml-files> <output.db>
6865
```
69-
</div>
7066

7167
Now configure [TinyDB as a provider for OGC API - Records](https://docs.pygeoapi.io/en/latest/data-publishing/ogcapi-records.html#tinydbcatalogue). Restart the service and verify the result. Verify also the XML output of some of the records.
7268

0 commit comments

Comments
 (0)