Skip to content

Commit d65aa08

Browse files
committed
clean up Mark's initial docs work
1 parent 6229fc6 commit d65aa08

21 files changed

+23
-601
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ wheels/
5656
*.egg
5757
MANIFEST
5858
.cache/*
59+
docs/.cache/*
5960

6061
# PyInstaller
6162
# Usually these files are written by a python script from a template

.readthedocs.yaml

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

docs/Makefile

Lines changed: 18 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,26 @@
1-
# Minimal makefile for Sphinx documentation
1+
# Minimal mkdocs makefile
22

3-
# You can set these variables from the command line, and also
4-
# from the environment for the first two.
5-
SPHINXOPTS ?=
6-
SPHINXBUILD ?= sphinx-build
7-
SOURCEDIR = source
8-
BUILDDIR = build
3+
PYTHON := python3
4+
MKDOCS_CMD := mkdocs
5+
MKDOCS_CONF := ../mkdocs.yml
96

10-
EXAMPLES_SRC = ../examples
11-
EXAMPLES_DST = $(SOURCEDIR)/doc
7+
.PHONY: help install serve build clean
128

13-
.PHONY: help Makefile clean update-examples html
14-
15-
# Default target
169
help:
17-
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
10+
@echo "Available targets:"
11+
@echo " install Install dependencies globally"
12+
@echo " serve Serve docs locally"
13+
@echo " build Build static site"
14+
@echo " clean Remove build artifacts"
1815

19-
# Clean build and copied example files
20-
clean:
21-
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
22-
rm -rf $(EXAMPLES_DST)
16+
install:
17+
pip install -e "../[dev]"
2318

24-
# Copies .md files from ../examples/ to source/doc/, and updates docs/examples.md
25-
update-examples:
26-
rm -rf $(EXAMPLES_DST)
27-
mkdir -p $(EXAMPLES_DST)
28-
DOCS_ROOT=$$(pwd); \
29-
cd $(EXAMPLES_SRC) && find . -name '*.md' -type f -exec sh -c ' \
30-
DOCS_ROOT="'"$$DOCS_ROOT"'"; \
31-
EXAMPLES_DST="'"$(EXAMPLES_DST)"'"; \
32-
for f; do \
33-
mkdir -p "$$DOCS_ROOT/$$EXAMPLES_DST/$$(dirname "$$f")"; \
34-
cp "$$f" "$$DOCS_ROOT/$$EXAMPLES_DST/$$f"; \
35-
done' sh {} +
36-
@echo "Generating source/examples.md..."
37-
@./scripts/copy-example-docs.sh
19+
serve:
20+
$(MKDOCS_CMD) serve --livereload -f $(MKDOCS_CONF)
3821

39-
# Build docs and optionally serve locally
40-
html: clean update-examples
41-
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
42-
@if [ -z "$$CI" ]; then \
43-
echo "Starting local HTTP server at http://localhost:8000"; \
44-
python3 -m http.server --directory $(BUILDDIR)/html; \
45-
fi
22+
build:
23+
$(MKDOCS_CMD) build -f $(MKDOCS_CONF)
4624

47-
# Catch-all target: route all unknown targets to Sphinx using the new
48-
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
49-
%: Makefile
50-
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
25+
clean:
26+
rm -rf site/ .cache/

docs/README.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cd docs
99
- Install the dependencies:
1010

1111
```bash
12-
pip install -r docs/requirements.txt
12+
make install
1313
```
1414

1515
- Clean the previous build (optional but recommended):
@@ -18,16 +18,11 @@ pip install -r docs/requirements.txt
1818
make clean
1919
```
2020

21-
- Generate the HTML documentation:
21+
- Serve the docs:
2222

2323
```bash
24-
make html
24+
make serve
2525
```
2626

2727
This will start a local server at http://localhost:8000. You can now open your browser and view the documentation.
2828

29-
If port 8000 is already in use, you can specify a different port, for example:
30-
31-
```bash
32-
python -m http.server 3000 -d build/html/
33-
```

docs/requirements.txt

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

docs/scripts/copy-example-docs.sh

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

docs/source/_static/custom.css

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

docs/source/_static/custom.js

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

docs/source/_templates/sections/header.html

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

docs/source/about.md

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

0 commit comments

Comments
 (0)