diff --git a/.gitignore b/.gitignore index 8c0e27032..2729026dc 100644 --- a/.gitignore +++ b/.gitignore @@ -71,10 +71,6 @@ examples/.ipynb_checkpoints # Django stuff *.log -# Sphinx documentation -doc/_build/ -doc/generated/ - # PyBuilder target/ @@ -89,19 +85,3 @@ benchmarks # version file generated by setuptools-scm plotnine/_version.py - - -# Documentation -doc/examples -doc/reference/ -doc/_site/ -doc/_inv/ -doc/_extensions/ -doc/.quarto/ -doc/gallery/thumbnails -doc/objects.json -doc/objects.txt -doc/.luarc.json -doc/_environment -doc/_variables.yml -doc/site_libs diff --git a/doc/.gitignore b/doc/.gitignore index 5eb133eb4..278e16803 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,2 +1,15 @@ -/.quarto/ +.quarto/ +_extensions/ +_site/ +site_libs/ +_environment +_variables.yml + +# quartodoc +_inv/ +reference/ qrenderer.scss +objects.json +objects.txt +objects.inv +gallery/thumbnails diff --git a/doc/Makefile b/doc/Makefile index c6ba94867..6bdc8dc43 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -14,6 +14,13 @@ for line in sys.stdin: endef export PRINT_HELP_PYSCRIPT +define CREATE_OBJECTS_INV +import sphobjinv as soi +inv = soi.Inventory(source="objects.txt") +soi.writebytes("objects.inv", soi.compress(inv.data_file())) +endef +export CREATE_OBJECTS_INV + QRENDERER_STYLE_FILE=qrenderer.scss QRENDERER_STYLE_URL=https://raw.githubusercontent.com/has2k1/qrenderer/main/doc/qrenderer.scss @@ -27,6 +34,8 @@ clean: ## Remove build artefacts rm -rf reference/ rm -rf _site/ rm -rf _inv/ + rm objects.txt + rm objects.inv readme-images: cd images; python readme_images.py @@ -49,6 +58,7 @@ config: ## Configure project for quartodoc and quarto docstrings: config ## Generate qmd files from the docstrings quartodoc build --config _quartodoc.yml + @python -c "$$CREATE_OBJECTS_INV" html: docstrings download_qrenderer_style ## Build html site quarto render diff --git a/doc/_quarto.yml b/doc/_quarto.yml index b417868f6..48bcf6d5a 100644 --- a/doc/_quarto.yml +++ b/doc/_quarto.yml @@ -1,7 +1,7 @@ project: type: website resources: - - objects.txt + - objects.inv render: - "reference/**.qmd" - "*.qmd"