From 148f0817e15391611191b272b609fac66c686ffb Mon Sep 17 00:00:00 2001 From: KonanAI <110348966+konan-ai@users.noreply.github.com> Date: Tue, 25 Jul 2023 16:08:11 -0400 Subject: [PATCH] Update conf.py Signed-off-by: KonanAI <110348966+konan-ai@users.noreply.github.com> --- docs/conf.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 8fc9bf2..24d40d3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -105,13 +105,15 @@ def github_link(name, rawtext, text, lineno, inliner, options=None, content=None def setup(app: Sphinx): app.add_role("gh", github_link) - -# app.connect('build-finished', run_postprocess) + app.connect('build-finished', run_postprocess) -# def run_postprocess(app, exception): -# # The script and html directory paths -# script_path = os.path.join(os.path.dirname(__file__), "postprocess.py") -# html_dir_path = os.path.join(app.outdir) +def run_postprocess(app, exception): + # The script and html directory paths + script_path = os.path.join(os.path.dirname(__file__), "postprocess.py") + + # The path to the 'index.html' file + html_file_path = os.path.join(app.outdir, "index.html") -# # Call the postprocess script on the html directory -# subprocess.check_call([sys.executable, script_path, html_dir_path]) + # Call the postprocess script on the 'index.html' file + subprocess.check_call([sys.executable, script_path, html_file_path]) +