Documentation: support versioned docs
This commit is contained in:
parent
36088e8d21
commit
a59c7744f8
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
# You can set these variables from the command line, and also
|
# You can set these variables from the command line, and also
|
||||||
# from the environment for the first two.
|
# from the environment for the first two.
|
||||||
SPHINXOPTS ?= -j auto
|
SPHINXOPTS ?= -j auto -A nuttx_versions="latest,${NUTTX_VERSIONS}"
|
||||||
SPHINXBUILD ?= sphinx-build
|
SPHINXBUILD ?= sphinx-build
|
||||||
SOURCEDIR = .
|
SOURCEDIR = .
|
||||||
BUILDDIR = _build
|
BUILDDIR = _build
|
||||||
|
@ -86,3 +86,8 @@ span.menuselection
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border: 1px solid rgb(204, 204, 204);
|
border: 1px solid rgb(204, 204, 204);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.version-selector
|
||||||
|
{
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
@ -37,9 +37,9 @@
|
|||||||
more modern -->
|
more modern -->
|
||||||
|
|
||||||
<div class="version-selector">
|
<div class="version-selector">
|
||||||
<select>
|
<select onchange="javascript:location.href = this.value;">
|
||||||
{% for nuttx_version in nuttx_versions %}
|
{% for nuttx_version in nuttx_versions.split(',') %}
|
||||||
<option value="{{ nuttx_version }}" {% if nuttx_version == version %}selected="selected"{% endif %}>{{ nuttx_version }}</option>
|
<option value="{{ url_root }}../{{ nuttx_version }}" {% if nuttx_version == version %}selected="selected"{% endif %}>{{ nuttx_version }}</option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
@ -74,10 +74,12 @@ 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)
|
# list of documentation versions to offer (besides latest). this will be
|
||||||
|
# overriden by command line option but we can provide a sane default
|
||||||
|
# this way
|
||||||
|
|
||||||
html_context = dict()
|
html_context = dict()
|
||||||
html_context['nuttx_versions'] = ['latest']
|
html_context['nuttx_versions'] = 'latest'
|
||||||
|
|
||||||
# TODO: append other options using releases detected from git (or maybe just
|
# TODO: append other options using releases detected from git (or maybe just
|
||||||
# a few hand-selected ones, or maybe just a "stable" option)
|
# a few hand-selected ones, or maybe just a "stable" option)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user