Docs: Added jquery, better handling of js files through sphinx config… (#1049)

Closes #1005 #1045
This commit is contained in:
Michael Panchenko 2024-02-12 15:43:32 +01:00 committed by GitHub
parent 33d241a29b
commit e3c610d37c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 12 deletions

View File

@ -55,16 +55,7 @@ html:
use_repository_button : false # Whether to add a link to your repository button
use_issues_button : false # Whether to add an "open an issue" button
use_multitoc_numbering : true # Continuous numbering across parts/chapters
# Needed for vegaEmbed used in docs/_static/js/benchmark.js
# We include copies for local, offline development. Loading them will raise an irrelevant error in js console when served online
extra_footer : |
<script src="/tianshou/docs/_build/_static/js/vega@5.js" type="text/javascript"></script>
<script src="/tianshou/docs/_build/_static/js/vega-lite@5.js" type="text/javascript"></script>
<script src="/tianshou/docs/_build/_static/js/vega-embed@5.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/vega@5"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@5"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@5"></script>
extra_footer : ""
google_analytics_id : "" # A GA id that can be used to track book views.
home_page_in_navbar : true # Whether to include your home page in the left Navigation Bar
baseurl : "https://tianshou.readthedocs.io/en/master/"
@ -95,8 +86,8 @@ launch_buttons:
colab_url : "https://colab.research.google.com"
repository:
url : https://github.com/thu-ml/tianshou.git # The URL to your book's repository
path_to_book : ./docs/ # A path to your book's folder, relative to the repository root.
url : https://github.com/thu-ml/tianshou # The URL to your book's repository
path_to_book : docs # A path to your book's folder, relative to the repository root.
branch : master # Which branch of the repository should be used when creating links
#######################################################################################
@ -110,6 +101,14 @@ sphinx:
local_extensions : # A list of local extensions to load by sphinx specified by "name: path" items
recursive_update : false # A boolean indicating whether to overwrite the Sphinx config (true) or recursively update (false)
config : # key-value pairs to directly over-ride the Sphinx configuration
html_static_path: ["_static"]
# Needed for vegaEmbed and jquery used in benchmark.js and copybutton.js
# We include copies for local, offline development
html_js_files:
- vega@5.js
- vega-embed@5.js
- vega-lite@5.js
- jquery-1.12.4.min.js
autodoc_typehints_format: "short"
autodoc_show_sourcelink: True
add_module_names: False

5
docs/_static/js/jquery-1.12.4.min.js vendored Normal file

File diff suppressed because one or more lines are too long