Skip to content

Commit

Permalink
fix online doc search (#4350) (#4358)
Browse files Browse the repository at this point in the history
* fix online doc search

* update html patching scripts

---------

Co-authored-by: ZhangJianyu <zhang.jianyu@outlook.com>
Co-authored-by: Jing Xu <jing.xu@intel.com>
  • Loading branch information
3 people authored Jun 17, 2024
1 parent d60d451 commit 2e95731
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
"recommonmark",
"sphinx_markdown_tables",
"sphinx_md",
"sphinx_rtd_theme",
"sphinxcontrib.jquery",
"sphinxemoji.sphinxemoji",
"breathe",
]
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ wheel
breathe
sphinx
sphinx_rtd_theme
sphinxcontrib.jquery
sphinx-markdown-tables
sphinx_md
sphinxemoji
Expand Down
9 changes: 9 additions & 0 deletions scripts/build_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -252,3 +252,12 @@ elif [[ ${DEVICE} == "gpu" ]]; then
rm -rf xml
mv tutorials/features/advanced_configuration.md.bk tutorials/features/advanced_configuration.md
fi

LN=$(grep "searchtools.js" -n _build/html/search.html | cut -d ":" -f 1)
sed -i "${LN}i \ \ \ \ <script src=\"_static/js/theme.js\"></script>" _build/html/search.html
sed -i "${LN}i \ \ \ \ <script src=\"_static/sphinx_highlight.js?v=dc90522c\"></script>" _build/html/search.html
sed -i "${LN}i \ \ \ \ <script src=\"_static/doctools.js?v=9a2dae69\"></script>" _build/html/search.html
sed -i "${LN}i \ \ \ \ <script src=\"_static/documentation_options.js?v=fc837d61\"></script>" _build/html/search.html
sed -i "${LN}i \ \ \ \ <script src=\"_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c\"></script>" _build/html/search.html
sed -i "${LN}i \ \ \ \ <script src=\"_static/jquery.js?v=5d32c60e\"></script>" _build/html/search.html
sed -i "${LN}i \ \ \ \ <\!\-\-[if lt IE 9]><script src=\"_static/js/html5shiv.min.js\"></script><\![endif]\-\->" _build/html/search.html

0 comments on commit 2e95731

Please sign in to comment.