Skip to content

Commit

Permalink
added import
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche committed May 15, 2024
1 parent 93efb3c commit 9866b18
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/scripts/patch_devsite_toc.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def __init__(self, dir_name, index_file_name):
self.dir_name = dir_name
self.index_file_name = index_file_name
index_file_path = os.path.join(dir_name, index_file_name)
# find set of files referenced by the index file
with open(index_file_path, "r") as f:
self.title = f.readline().replace("\n", "")
in_toc = False
Expand Down
1 change: 1 addition & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ def docfx(session):
# Customization: Add extra sections to the table of contents for the Standard vs Async clients
import sys

session.install("pyyaml")
# import local module at docs/scripts/patch_devsite_toc.py
sys.path.append(os.path.join("docs", "scripts"))
import patch_devsite_toc
Expand Down
7 changes: 5 additions & 2 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,11 @@ def mypy(session):
docfx_postprocess = """
# Customization: Add extra sections to the table of contents for the Standard vs Async clients
import sys
sys.path.append(os.path.abspath(os.path.join("docs", "scripts")))
from docs.scripts import patch_devsite_toc
session.install("pyyaml")
# import local module at docs/scripts/patch_devsite_toc.py
sys.path.append(os.path.join("docs", "scripts"))
import patch_devsite_toc
toc_path = os.path.join("_build", "html", "docfx_yaml", "toc.yml")
custom_sections = [
patch_devsite_toc.TocSection(
Expand Down

0 comments on commit 9866b18

Please sign in to comment.