Skip to content

Commit 722d41b

Browse files
NeoZhangJianyuarthwpre-commit-ci[bot]
authored
[online doc] fix version in html (#2328)
* fix online doc build * fix version search * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: ZhangJianyu <zhang.jianyu@outlook.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 864f402 commit 722d41b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/build_docs/update_html.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ def update_version_link(version, folder_name, index_file):
2626

2727
with open(index_file, "r") as f:
2828
index_buf = f.read()
29-
key_str = ' <div class="version">\n {}\n </div>'.format(version)
30-
version_list = """<div class="version">
29+
key_str = '<div role="search">\n'
30+
version_list = """ <div class="version">
3131
<a href="{}versions.html">{}▼</a>
3232
<p>Click link above to switch version</p>
33-
</div>""".format(
33+
</div>
34+
<div role="search">\n""".format(
3435
index_path, folder_name
3536
)
3637
# print(index_buf.find(key_str))
@@ -97,4 +98,5 @@ def help(me):
9798

9899
folder = sys.argv[1]
99100
version = sys.argv[2]
101+
print(f"run {sys.argv[0]} {sys.argv[1]} {sys.argv[2]}")
100102
main(folder, version)

0 commit comments

Comments
 (0)