Skip to content

Commit

Permalink
支持多版本构建
Browse files Browse the repository at this point in the history
  • Loading branch information
iswbm committed Jul 8, 2021
1 parent 72d4e3d commit 2c76c35
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
Makefile
Pipfile
test*
build
1 change: 1 addition & 0 deletions baidu_verify_code-j8rREOCWer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
32921141075df4eec1922a52d6c7b1b1
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ sphinxcontrib-htmlhelp==1.0.2
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.2
sphinxcontrib-serializinghtml==1.1.3
sphinx-sitemap==2.2.0
sphinx-multiversion==0.2.4
27 changes: 27 additions & 0 deletions source/_templates/versions.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{%- if current_version %}
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Other Versions</span>
v: {{ current_version.name }}
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
{%- if versions.tags %}
<dl>
<dt>Tags</dt>
{%- for item in versions.tags %}
<dd><a href="{{ item.url }}">{{ item.name }}</a></dd>
{%- endfor %}
</dl>
{%- endif %}
{%- if versions.branches %}
<dl>
<dt>Branches</dt>
{%- for item in versions.branches %}
<dd><a href="{{ item.url }}">{{ item.name }}</a></dd>
{%- endfor %}
</dl>
{%- endif %}
</div>
</div>
{%- endif %}
5 changes: 3 additions & 2 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['chinese_search','sphinx.ext.mathjax', 'sphinx_multiversion']
extensions = ['chinese_search','sphinx.ext.mathjax', 'sphinx_sitemap','sphinx_multiversion']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down Expand Up @@ -129,11 +129,12 @@
version = '2.0'

# Options for extensions.

html_baseurl = 'http://pycharm.iswbm.com'
html_sidebars = {
'**': [
'versioning.html',
],
}

smv_latest_version = 'win'
sitemap_url_scheme = "{link}"

0 comments on commit 2c76c35

Please sign in to comment.