Skip to content

Commit 7024fa7

Browse files
Shallow docs setup with MKDocs #1686
1 parent 50e9d83 commit 7024fa7

File tree

9 files changed

+26
-38
lines changed

9 files changed

+26
-38
lines changed

.readthedocs.yaml

+2-6
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,9 @@ build:
1010
tools:
1111
python: "3.12"
1212

13-
# Build documentation in the docs/ directory with Sphinx
14-
sphinx:
15-
configuration: docs/conf.py
16-
1713
# Build documentation with MkDocs
18-
#mkdocs:
19-
# configuration: mkdocs.yml
14+
mkdocs:
15+
configuration: mkdocs.yml
2016

2117
python:
2218
install:

documentation/docs/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# DSMR-reader documentation

wiki/reference/API.md documentation/docs/reference/API.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ The application has an API, allowing you to insert/create readings and retrieve
55
## Configuration
66
You can access the API-documentation by selecting the **Support** menu item in DSMR-reader.
77

8-
![Support](/wiki/static/screenshots/api/support.png)
8+
![Screenshot](/static/screenshots/api/support.png)
99

1010

1111
### Enable API
1212
The API is disabled by default in the application. You may enable it in the **Configuration**.
1313

14-
![API settings](/wiki/static/screenshots/api/api-settings.png)
14+
![Screenshot](/static/screenshots/api/api-settings.png)
1515

1616

1717
## API key

documentation/mkdocs.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
site_name: DSMR-reader Documentation
2+
site_url: https://github.com/dsmrreader/dsmr-reader
3+
site_description: DSMR-reader
4+
site_author: Dennis Siemensma
5+
copyright: Dennis Siemensma
6+
theme: readthedocs
7+
locale: en
8+
markdown_extensions:
9+
- toc:
10+
baselevel: 2

documentation/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mkdocs==1.6

provisioning/container/Containerfile-dev

+4-12
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,11 @@ ENV POETRY_VIRTUALENVS_IN_PROJECT=true
2525
RUN pip install poetry
2626
COPY ./src/ /app/
2727
RUN poetry install --with dev --no-root
28-
EXPOSE 8000
2928
ENTRYPOINT ["poetry", "run"]
3029

3130

3231
FROM local-dsmrreader-base AS local-dsmrreader-docs
33-
WORKDIR /app-docs
34-
COPY ./docs/requirements.txt /app-docs/
35-
RUN pip install -r requirements.txt
36-
37-
FROM local-dsmrreader-docs AS local-dsmrreader-docs-en
38-
EXPOSE 10000
39-
ENTRYPOINT sphinx-autobuild . /var/tmp/_build/html --host 0.0.0.0 --port 10000 -D language=en
40-
41-
FROM local-dsmrreader-docs AS local-dsmrreader-docs-nl
42-
EXPOSE 10000
43-
ENTRYPOINT sphinx-autobuild . /var/tmp/_build/html --host 0.0.0.0 --port 10000 -D language=nl
32+
WORKDIR /app
33+
COPY ./documentation/ /app/
34+
RUN pip install -r /app/requirements.txt
35+
ENTRYPOINT ["mkdocs"]

provisioning/container/compose.dev.yml

+6-18
Original file line numberDiff line numberDiff line change
@@ -47,31 +47,19 @@ services:
4747
- ~/Desktop:/run/host/Desktop/
4848

4949
# http://localhost:10000
50-
dsmr-docs-en:
51-
container_name: dsmr-docs-en
52-
restart: 'unless-stopped'
50+
dsmr-docs:
51+
container_name: dsmr-docs
52+
restart: 'on-failure'
53+
command: 'serve --dev-addr 0.0.0.0:10000'
5354
build:
5455
context: .
5556
dockerfile: provisioning/container/Containerfile-dev
56-
target: local-dsmrreader-docs-en
57+
target: local-dsmrreader-docs
5758
volumes:
58-
- ./docs:/app-docs
59+
- ./documentation:/app
5960
ports:
6061
- '10000:10000'
6162

62-
# http://localhost:10001
63-
dsmr-docs-nl:
64-
container_name: dsmr-docs-nl
65-
restart: 'unless-stopped'
66-
build:
67-
context: .
68-
dockerfile: provisioning/container/Containerfile-dev
69-
target: local-dsmrreader-docs-nl
70-
volumes:
71-
- ./docs:/app-docs
72-
ports:
73-
- '10001:10000'
74-
7563
mosquitto:
7664
container_name: mosquitto-dev
7765
image: eclipse-mosquitto:2

0 commit comments

Comments
 (0)