mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 13:18:50 +08:00
add basic support for multiple versions
This commit is contained in:
parent
3f723a247d
commit
d9be1dffab
3 changed files with 44 additions and 0 deletions
|
@ -23,3 +23,10 @@
|
||||||
overflow: visible !important;
|
overflow: visible !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.wy-nav-side
|
||||||
|
{
|
||||||
|
padding-bottom: 0em !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
30
Documentation/_templates/layout.html
Normal file
30
Documentation/_templates/layout.html
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{% extends "!layout.html" %}
|
||||||
|
{% block sidebartitle %}
|
||||||
|
{% if logo and theme_logo_only %}
|
||||||
|
<a href="{{ pathto(master_doc) }}">
|
||||||
|
{% else %}
|
||||||
|
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if logo %}
|
||||||
|
{# Not strictly valid HTML, but it's the only way to display/scale
|
||||||
|
it properly, without weird scripting or heaps of work
|
||||||
|
#}
|
||||||
|
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="{{ _('Logo') }}"/>
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<!-- this version selector is quite ugly, should be probably replaced by something
|
||||||
|
more modern -->
|
||||||
|
|
||||||
|
<div class="version-selector">
|
||||||
|
<select>
|
||||||
|
{% for nuttx_version in nuttx_versions %}
|
||||||
|
<option value="{{ nuttx_version }}" {% if nuttx_version == version %}selected="selected"{% endif %}>{{ nuttx_version }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% include "searchbox.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
|
@ -51,6 +51,13 @@ templates_path = ['_templates']
|
||||||
# This pattern also affects html_static_path and html_extra_path.
|
# This pattern also affects html_static_path and html_extra_path.
|
||||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||||
|
|
||||||
|
# list of documentation versions to offer (besides latest)
|
||||||
|
|
||||||
|
html_context = dict()
|
||||||
|
html_context['nuttx_versions'] = ['latest']
|
||||||
|
|
||||||
|
# TODO: append other options using releases detected from git (or maybe just
|
||||||
|
# a few hand-selected ones, or maybe just a "stable" option)
|
||||||
|
|
||||||
# -- Options for HTML output -------------------------------------------------
|
# -- Options for HTML output -------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue