Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs/move to sphinx-multiversion #104

Merged
merged 7 commits into from
Oct 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Handle jenkins branch for release validation
name: Workflow for release branches
on:
push:
branches:
Expand Down
27 changes: 27 additions & 0 deletions docs/_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 %}
9 changes: 9 additions & 0 deletions docs/assets/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Redirecting to last stable tag</title>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=./2.0.0/index.html">
<link rel="canonical" href="https://indigo-dc.github.io/jenkins-pipeline-library/2.0.0/index.html">
</head>
</html>
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx_multiversion',
'sphinx_tabs.tabs',
'sphinx.ext.autosectionlabel'
]
Expand Down Expand Up @@ -344,3 +345,7 @@

# -- Options for sphinx-versioning -------------------------------------------
scv_whitelist_branches = ('(stable|release){1}/.+',)
# -- Options for sphinx-multiversion------------------------------------------
smv_tag_whitelist = r'^\d+\.\d+\.\d+$'
smv_branch_whitelist = r'(stable|release){1}/.+'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orviz is expected that master branch be excluded from the documentation releases? And what about tags x.y.z?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when testing the sphinx-multiversion the documentation for the tag 2.0.0 was automatically built, that's why I didn't include a specific definition for the tags. But, as you propose, it does no harm to provide a whitelist for tags too. I've tested it and works as expected.

smv_remote_whitelist = r'^.*$'
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
sphinx
sphinx-rtd-theme
sphinx-tabs
sphinx-multiversion
ghp-import