From d3ca59849114d55823e42d653fb46d4203979587 Mon Sep 17 00:00:00 2001 From: Dima Tisnek Date: Tue, 20 Aug 2024 15:20:56 +0900 Subject: [PATCH] wip: sphinx-autobuild --- docs/conf.py | 4 ++-- tox.ini | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index e0cceed92..3797da689 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,9 +2,9 @@ import sys import os -sys.path.append('./') +sys.path.append(os.path.abspath('.')) from custom_conf import * -sys.path.append('.sphinx/') +sys.path.append(os.path.abspath('.sphinx/')) from build_requirements import * # Configuration file for the Sphinx documentation builder. diff --git a/tox.ini b/tox.ini index ecadde087..8632007c9 100644 --- a/tox.ini +++ b/tox.ini @@ -37,6 +37,16 @@ commands_pre = commands = sphinx-build -W --keep-going docs/ docs/_build/html +[testenv:docs-live] +description = Live development: build the Sphinx docs with autoreloading enabled +deps = + {[testenv:docs]deps} + sphinx-autobuild +commands_pre = + {[testenv:docs]commands_pre} +commands = + sphinx-autobuild docs/ docs/_build/html --watch docs --port 8000 + [testenv:fmt] description = Apply coding style standards to code deps =