Skip to content

Commit

Permalink
Update conf.py
Browse files Browse the repository at this point in the history
Signed-off-by: KonanAI <[email protected]>
  • Loading branch information
konan-ai authored Jul 25, 2023
1 parent e66fd32 commit 148f081
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])

0 comments on commit 148f081

Please sign in to comment.