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 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+24 −0
Diff settings

Always

Just for now

Next

docs: Add way to select version for documentation

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
  • Loading branch information...
Akasurde committed Mar 5, 2019
commit 7660e62a6c2eb87005bf409bfa42ef2cc9252880
@@ -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 %}

Copy path View file
@@ -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.