Skip to content
Snippets Groups Projects
Commit ed5887d1 authored by vuillaut's avatar vuillaut
Browse files

using sphinx_multiversion to generate multiple versions doc

parent afcd6a60
No related branches found
No related tags found
1 merge request!92Documentation versioning
{% if versions %}
<h3>{{ _('Versions') }}</h3>
<ul>
{%- for item in versions %}
<li><a href="{{ item.url }}">{{ item.name }}</a></li>
{%- endfor %}
</ul>
{% endif %}sphinx-multiversion
\ No newline at end of file
{%- 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 %}
\ No newline at end of file
......@@ -48,11 +48,18 @@ extensions = [
'sphinx.ext.napoleon',
'nbsphinx',
'myst_parser',
'sphinx_multiversion',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
html_sidebars = {
'**': [
'versioning.html',
],
}
# Parsers
# source_parsers = {
# }
......@@ -85,4 +92,25 @@ html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
# nbsphinx
nbsphinx_allow_errors = True
\ No newline at end of file
nbsphinx_allow_errors = True
# sphinx-multiversion
# Whitelist pattern for tags (set to None to ignore all tags)
smv_tag_whitelist = r'^.*$'
# Whitelist pattern for branches (set to None to ignore all branches)
# smv_branch_whitelist = r'^.*$'
smv_branch_whitelist = None
# Whitelist pattern for remotes (set to None to use local branches only)
smv_remote_whitelist = None
# Pattern for released versions
smv_released_pattern = r'^tags/.*$'
# Format for versioned output directories inside the build directory
smv_outputdir_format = '{ref.name}'
# Determines whether remote or local git branches/tags are preferred if their output dirs conflict
smv_prefer_remote_refs = False
\ No newline at end of file
......@@ -2,4 +2,5 @@ sphinx>=3
nbsphinx
sphinx_rtd_theme
myst-parser
ipykernel
\ No newline at end of file
ipykernel
sphinx_multiversion
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment