Skip to content

Commit 30e1616

Browse files
docs: Migrate from sphinx to mkdocs. Improve Navigation (#42)
* docs: Migrate from sphinx to mkdocs - build * docs: Migrate from sphinx to mkdocs - setup readthedocs * docs: Migrate from sphinx to mkdocs - fix nifi link * docs: Fix all admonitions * docs: Refactor navigation
1 parent 85029d1 commit 30e1616

76 files changed

Lines changed: 1040 additions & 415 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/doc-build.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,27 @@ on:
77
branches:
88
- '**'
99
tags:
10-
- 'v*.*.*'
10+
- 'docs-v*.*.*'
1111
release:
1212
types: [published]
13+
14+
defaults:
15+
run:
16+
working-directory: ./docs
1317
jobs:
1418
build:
1519
runs-on: ubuntu-latest
16-
env:
17-
working-directory: ./docs
1820
steps:
1921
- uses: actions/checkout@v3
20-
- name: Check documentation build
22+
- name: Install uv for Python 3.13
23+
uses: astral-sh/setup-uv@v6
24+
with:
25+
python-version: 3.13
26+
enable-cache: true
27+
cache-dependency-glob: "docs/uv.lock"
28+
- name: Install the project
29+
run: |
30+
uv sync --all-extras
31+
- name: Build documentation
2132
run: |
22-
cd docs
23-
pip3 install -r requirements.txt
24-
make clean
25-
# Fail buiild on any docs warning
26-
# make html O=-W # Removed whilst migrating existing docs
27-
make html
33+
uv run mkdocs build

.readthedocs.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@
55
version: 2
66

77
build:
8-
os: ubuntu-20.04
8+
os: "ubuntu-24.04"
99
tools:
10-
python: "3.9"
10+
python: "3.13"
11+
jobs:
12+
pre_create_environment:
13+
- cd docs
14+
- asdf plugin add uv
15+
- asdf install uv latest
16+
- asdf global uv latest
17+
create_environment:
18+
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
19+
install:
20+
- cd docs && UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen
1121

12-
sphinx:
13-
configuration: docs/conf.py
14-
fail_on_warning: false # Removed warnings to migrate existing docs
15-
16-
python:
17-
install:
18-
- requirements: docs/requirements.txt
22+
mkdocs:
23+
configuration: docs/mkdocs.yml

docs/Makefile

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

docs/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# CogStack Documentation
2+
3+
The central documentation for cogstack, hosted on docs.cogstack.org
4+
5+
## Setup
6+
7+
### Prerequisites
8+
9+
- Python 3.10 or higher
10+
- [uv](https://github.com/astral-sh/uv) package manager
11+
12+
### Installation
13+
14+
```bash
15+
uv venv --python 3.12 --allow-existing
16+
source .venv/bin/activate
17+
uv sync --dev
18+
```
19+
20+
## Usage
21+
22+
### Serve documentation locally (Development)
23+
24+
To preview the documentation locally with live reload:
25+
26+
```bash
27+
uv run mkdocs serve
28+
```
29+
30+
The documentation will be available at `http://127.0.0.1:8000`
31+
32+
### Build documentation
33+
34+
To build the static site:
35+
36+
```bash
37+
uv run mkdocs build
38+
```
39+
40+
The built site will be in the `site/` directory.

docs/conf.py

Lines changed: 0 additions & 61 deletions
This file was deleted.
File renamed without changes.

docs/_static/screenshots-dashboards-availability.png renamed to docs/docs/_static/screenshots-dashboards-availability.png

File renamed without changes.

docs/_static/screenshots-dashboards-docker-metrics.png renamed to docs/docs/_static/screenshots-dashboards-docker-metrics.png

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)