Skip to content

Commit 92de595

Browse files
committed
update doc tooling to Zensical
1 parent 916389b commit 92de595

6 files changed

Lines changed: 67 additions & 45 deletions

File tree

.github/workflows/docs.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ jobs:
1818
python-version: '3.12'
1919
- name: Install requirements 📦
2020
run: |
21-
pip3 install mkdocs
22-
- name: Deploy 📦
23-
run: cd docs && mkdocs gh-deploy --force -m 'update website'
21+
pip3 install zensical
22+
- name: Build site 📦
23+
run: |
24+
zensical build --clean --strict
25+
mv site /tmp/
26+
- name: checkout gh-pages branch
27+
uses: actions/checkout@master
28+
with:
29+
ref: gh-pages
30+
- name: Deploy to GitHub Pages 📦
31+
run: |
32+
git checkout gh-pages
33+
git config --global user.email "tomkralidis@gmail.com"
34+
git config --global user.name "Tom Kralidis"
35+
ls | grep -v ".nojekyll"| xargs rm -fr
36+
mv -f /tmp/site/* .
37+
git add .
38+
git commit -am "update website via GitHub Actions"
39+
git push

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
pip3 install ".[docs]"
2424
pip3 install ".[release]"
2525
- name: build docs 🏗️
26-
run: mkdocs build -f docs/mkdocs.yml
26+
run: zensical build --clean --strict
2727
- name: run flake8 ⚙️
2828
run: flake8
2929
- name: build Python package 🏗️

docs/README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# pygeometa Website
22

33
The pygeometa [website](https://geopython.github.io/pygeometa/) is powered
4-
by [MkDocs](https://www.mkdocs.org) which facilitates easy management
4+
by [Zensical](https://zensical.org) which facilitates easy management
55
of website content and publishing.
66

77
## Setting up the website environment locally
@@ -16,9 +16,9 @@ git clone https://github.com/geopython/pygeometa.git
1616
pip3 install -r requirements-dev.txt
1717
cd pygeometa/doc
1818
# build the website
19-
mkdocs build
19+
zensical build --clean --strict
2020
# serve locally
21-
mkdocs serve # website is made available on http://localhost:8000/
21+
zensical serve # website is made available on http://localhost:8000/
2222
```
2323

2424
## Content management workflow
@@ -39,10 +39,10 @@ The basic workflow is as follows:
3939

4040
```bash
4141
vi content/new-page.md # add content
42-
vi mkdocs.yml # add to navigation section
42+
vi zensical.toml # add to navigation section
4343
# edit any other files necessary which may want to link to the new page
4444
git add content/new-page.md
45-
git commit -m 'add new page on topic x' content/new-page.md mkdocs.yml
45+
git commit -m 'add new page on topic x' content/new-page.md zensical.toml
4646
git push origin master
4747
```
4848

@@ -56,8 +56,4 @@ git push origin master
5656

5757
## Publishing updates to the live site
5858

59-
```bash
60-
# NOTE: you require access privileges to the GitHub repository
61-
# to publish live updates
62-
mkdocs gh-deploy -m 'add new page on topic x'
63-
```
59+
Website updates are automatically published via GitHub Actions.

docs/mkdocs.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

docs/zensical.toml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[project]
2+
site_name = "pygeometa: Metadata Creation for the Rest of Us"
3+
site_description = "pygeometa is a Python package to manage metadata for geospatial datasets"
4+
site_author = "the pygeometa team"
5+
copyright = "© 2009-2025 Government of Canada, 2015-2026 pygeometa development team"
6+
site_url = "https://geopython.github.io/pygeometa"
7+
repo_url = "https://github.com/geopython/pygeometa"
8+
docs_dir = "content"
9+
edit_uri = "edit/master/content"
10+
11+
nav = [
12+
{"Code" = "https://github.com/geopython/pygeometa"},
13+
{"Tutorial" = "tutorial.md"},
14+
{"Reference" = [
15+
{"Metadata Control File" = [
16+
{"Core" = "reference/mcf.md"},
17+
{"Extensions" = [
18+
{"ISO 19115-2, Part 2: Extensions for acquisition and processing" = "reference/extensions/iso19139-2.md"},
19+
{"ISO Harmonized North American Profile (HNAP)" = "reference/extensions/iso19139-hnap.md"},
20+
{"WMO Core Metadata Profile" = "reference/extensions/wmo-cmp.md"},
21+
{"WMO Core Metadata Profile 2" = "reference/extensions/wmo-wcmp2.md"},
22+
{"WMO WIGOS Metadata Standard" = "reference/extensions/wmo-wigos.md"}
23+
]},
24+
]},
25+
]},
26+
{"pygeoapi plugin" = "pygeoapi-plugin.md"}
27+
]
28+
29+
[project.theme]
30+
language = "en"
31+
features = [
32+
"content.action.edit",
33+
"content.action.view",
34+
"navigation.top",
35+
"navigation.tracking.prev_next",
36+
"navigation.tracking.section"
37+
]
38+
39+
[project.extra]
40+
homepage = "https://geopython.github.io/pygeometa"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dependencies = [
3636

3737
[project.optional-dependencies]
3838
dev = ["flake8"]
39-
docs = ["mkdocs", "mkdocs-bootswatch"]
39+
docs = ["zensical"]
4040
release = ["build", "twine", "wheel"]
4141

4242
[project.scripts]

0 commit comments

Comments
 (0)