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: Add way to select version for documentation #53317

Draft
wants to merge 2 commits into
base: devel
from
Draft
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+45 −28
Diff settings

Always

Just for now

@@ -150,27 +150,21 @@
<div class="wy-side-nav-search">
{% block sidebartitle %}

<div style="background-color:#5bbdbf;height=80px;margin:'auto auto auto auto'">
<a class="DocSiteProduct-header DocSiteProduct-header--core" href="/">
<div class="DocSiteProduct-productName">
<div style="background-color:#5bbdbf;height=80px;margin:'auto auto auto auto'">
<a class="DocSiteProduct-header DocSiteProduct-header--core" href="/">
<div class="DocSiteProduct-productName">
<div class="DocSiteProduct-logoText">
Ansible
<div class="DocSiteProduct-CurrentVersion" align="right">
devel
</div>
Ansible
<div class="DocSiteProduct-CurrentVersion" align="right">devel</div>
</div>
</div>
</a>

<div class="DocSiteProduct-CheckVersionPara">For previous versions, see the <a class="DocSiteProduct-versionheader" href="/#coreversionselect">documentation archive.</a></div>
</div>
</div>
</a>
</div>

<div class="wy-side-nav-search" style="background-color#5bbdbf;height=80px;margin:'auto auto auto auto'">
<!-- <a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}</a> -->
{% include "searchbox.html" %}
</div>
<div class="wy-side-nav-search" style="background-color#5bbdbf;height=80px;margin:'auto auto auto auto'">
{% include "searchbox.html" %}
</div>


{% endblock %}
</div>

@@ -194,19 +188,18 @@
{% endif %}
{% endblock %}
</div>
<!-- changeable widget -->
<div id="sideBanner">
<br/>
<a href="https://www.ansible.com/docs-left?utm_source=docs">
<img style="border-width:0px;" src="https://cdn2.hubspot.net/hubfs/330046/docs-graphics/ASB-docs-left-rail.png" />
</a>
</div>


<!-- changeable widget -->

<div id="sideBanner">
<br/>
<a href="https://www.ansible.com/docs-left?utm_source=docs">
<img style="border-width:0px;" src="https://cdn2.hubspot.net/hubfs/330046/docs-graphics/ASB-docs-left-rail.png" />
</a>
<br/><br/><br/>
</div>
</div>
&nbsp;
</nav>
</div>
</div>


<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
@@ -33,5 +33,23 @@

</div>
</div>
{% else %}
<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">Ansible Version docs</span>

This comment has been minimized.

Copy link
@dagwieers

dagwieers Mar 5, 2019

Member
Suggested change
<span class="fa fa-book">Ansible Version docs</span>
<span class="fa fa-book">Ansible documentation:</span>

This comment has been minimized.

Copy link
@Akasurde

Akasurde Mar 5, 2019

Author Member

OK.

This comment has been minimized.

Copy link
@samccann

samccann Mar 5, 2019

Contributor

I'd like to keep 'version' in the name here... so maybe "Ansible documentation versions:" ?

v: {{ current_version }}
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl>
<dt>{{ _('Versions') }}</dt>
{% for slug in available_versions %}
<dd>
<a href="{{ doc_base_url }}/{{ slug }}/index.html">{{ slug }}</a>
</dd>
{% endfor %}
</dl>
</div>
</div>
{% endif %}

@@ -240,3 +240,9 @@
intersphinx_mapping = {'python': ('https://docs.python.org/2/', (None, '../python2-2.7.13.inv')),
'python3': ('https://docs.python.org/3/', (None, '../python3-3.6.2.inv')),
'jinja2': ('http://jinja.pocoo.org/docs/', (None, '../jinja2-2.9.7.inv'))}

html_context = {
'current_version': '2.7',

This comment has been minimized.

Copy link
@samccann

samccann Mar 5, 2019

Contributor

What's the impact if we have 'current_version': 'latest' (so presumably we don't have to change that line ever?)

'available_versions': ('2.4', '2.5', '2.6', '2.7', 'latest', 'devel'),
'doc_base_url': 'https://docs.ansible.com/ansible'
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.