diff --git a/docs/Makefile b/docs/Makefile index c3ec7524b..055b8cbe2 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -30,7 +30,7 @@ $(BUILD_DIR): # Dev dev: $(VENV) - poetry run _scripts/serve.py + poetry run sphinx-autobuild . /tmp/_build/ --port 8001 # I18n LOCALES = en_GB en_US fr diff --git a/docs/_scripts/serve.py b/docs/_scripts/serve.py deleted file mode 100755 index 71edcde2e..000000000 --- a/docs/_scripts/serve.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python3 - -from subprocess import check_call - -from livereload import Server, shell - -BUILD_DIR = "/tmp/_build" - - -def main() -> int: - # initial make - check_call(["make", "build", f"BUILD_DIR={BUILD_DIR}"]) - - server = Server() - server.watch("..", shell(f"make build BUILD_DIR={BUILD_DIR}")) - server.serve(root=BUILD_DIR, liveport=35730, port=8001, host="0.0.0.0") - - return 0 - - -if __name__ == "__main__": - raise SystemExit(main()) diff --git a/docs/poetry.lock b/docs/poetry.lock index 4a045e71b..5ce14e355 100644 --- a/docs/poetry.lock +++ b/docs/poetry.lock @@ -668,6 +668,26 @@ docs = ["sphinxcontrib-websupport"] lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-bugbear", "flake8-comprehensions", "flake8-simplify", "isort", "mypy (>=0.981)", "sphinx-lint", "types-requests", "types-typed-ast"] test = ["cython", "html5lib", "pytest (>=4.6)", "typed_ast"] +[[package]] +name = "sphinx-autobuild" +version = "2021.3.14" +description = "Rebuild Sphinx documentation on changes, with live-reload in the browser." +category = "dev" +optional = false +python-versions = ">=3.6" +files = [ + {file = "sphinx-autobuild-2021.3.14.tar.gz", hash = "sha256:de1ca3b66e271d2b5b5140c35034c89e47f263f2cd5db302c9217065f7443f05"}, + {file = "sphinx_autobuild-2021.3.14-py3-none-any.whl", hash = "sha256:8fe8cbfdb75db04475232f05187c776f46f6e9e04cacf1e49ce81bdac649ccac"}, +] + +[package.dependencies] +colorama = "*" +livereload = "*" +sphinx = "*" + +[package.extras] +test = ["pytest", "pytest-cov"] + [[package]] name = "sphinx-copybutton" version = "0.5.2" @@ -945,4 +965,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "68e8ecdc189a3b61ed1e8d4889c71a8686dd68684962a4ca7f964de77073cb06" +content-hash = "4b3f45e96f90e41f1d8b767463353fe420cee43794fb13383100f134e0ad23d6" diff --git a/docs/pyproject.toml b/docs/pyproject.toml index 05f1d53c6..99a23a659 100644 --- a/docs/pyproject.toml +++ b/docs/pyproject.toml @@ -20,7 +20,7 @@ django = "==3.2.20" django-environ = "==0.10.0" [tool.poetry.group.dev.dependencies] -livereload = "^2.6.3" +sphinx-autobuild = "^2021.3.14" [build-system] requires = ["poetry-core>=1.0.0"]