Skip to content

Commit ea9f4eb

Browse files
authored
docs: add mkdocs (#9)
Adds: - CI with simple linting - Pages workflow for deploying on tag push. Note that this won't deploy anything for now, we'll have to manually backfill the old versions cc @hrodmn Closes #8
1 parent 9046442 commit ea9f4eb

File tree

14 files changed

+2320
-9
lines changed

14 files changed

+2320
-9
lines changed

.github/workflows/ci.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
ci:
11+
name: CI
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v5
15+
- uses: DavidAnson/markdownlint-cli2-action@v20

.github/workflows/pages.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Pages
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
pages:
10+
name: Pages
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v5
14+
with:
15+
fetch-depth: 0
16+
- name: Deploy docs
17+
env:
18+
GIT_COMMITTER_NAME: CI
19+
GIT_COMMITTER_EMAIL: [email protected]
20+
run: |
21+
# Get most recent git tag
22+
# https://stackoverflow.com/a/7261049
23+
VERSION=$(git describe --tags --abbrev=0)
24+
mike deploy $VERSION latest --update-aliases --push

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.cache
2+
node_modules

.markdownlint-cli2.jsonc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"config": {
3+
"line-length": false,
4+
},
5+
"gitignore": true,
6+
"globs": ["**/*.md"],
7+
}

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,31 @@ For analytic questions like "find the items in the Sentinel-2 collection in June
2121

2222
## Development
2323

24-
Validate the example collection metadata against the jsonschema:
24+
Get [uv](https://docs.astral.sh/uv/getting-started/installation/), then:
25+
26+
```sh
27+
uv sync
28+
npm install
29+
```
30+
31+
To lint the markdown files:
32+
33+
```sh
34+
npm run lint
35+
# or, to fix errors
36+
npm run format
37+
```
38+
39+
To serve the documentation site:
40+
41+
```sh
42+
uv run mkdocs serve
43+
```
44+
45+
To validate the example collection metadata against the jsonschema:
2546

2647
```shell
27-
check-jsonschema --schemafile spec/json-schema/metadata.json spec/example-metadata.json
48+
uv run check-jsonschema --schemafile json-schema/metadata.json example-metadata.json
2849
```
2950

3051
## History

docs/drawbacks.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,3 @@ Then when the second item is converted back to JSON, it will be returned as
5252
```
5353

5454
which is not strictly equal to the input.
55-
56-
## Schema difficulties
57-
58-
JSON is schemaless while Parquet requires a strict schema, and it can be very difficult to unite these two systems. This is such an important consideration that we have a [documentation page](./schema.md) just to discuss this point.

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../stac-geoparquet-spec.md

mkdocs.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
site_name: stac-geoparquet-spec
2+
site_url: https://radiantearth.github.io/stac-geoparquet-spec/
3+
repo_url: https://github.com/radiantearth/stac-geoparquet-spec
4+
repo_name: stac-geoparquet-spec
5+
theme:
6+
name: material
7+
palette:
8+
- media: "(prefers-color-scheme)"
9+
toggle:
10+
icon: material/brightness-auto
11+
name: Switch to light mode
12+
- media: "(prefers-color-scheme: light)"
13+
primary: deep purple
14+
accent: indigo
15+
toggle:
16+
icon: material/brightness-7
17+
name: Switch to dark mode
18+
- media: "(prefers-color-scheme: dark)"
19+
scheme: slate
20+
primary: deep purple
21+
accent: indigo
22+
toggle:
23+
icon: material/brightness-4
24+
name: Switch to system preference
25+
26+
nav:
27+
- index.md
28+
- drawbacks.md
29+
30+
plugins:
31+
- search
32+
- social
33+
- mike:
34+
alias_type: "copy"
35+
canonical_version: "latest"
36+
37+
extra:
38+
version:
39+
provider: mike

0 commit comments

Comments
 (0)