mirror of
https://github.com/valitydev/salt.git
synced 2024-11-06 08:35:21 +00:00
update docs to build off master instead of develop
This commit is contained in:
parent
7a1a374328
commit
896fd40d05
20
doc/_themes/saltstack2/layout.html
vendored
20
doc/_themes/saltstack2/layout.html
vendored
@ -178,13 +178,13 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-11 col-md-offset-1 col-lg-10 col-lg-offset-1">
|
||||
<nav class="pull-left text-muted">
|
||||
<a href="https://github.com/saltstack/salt/edit/develop/doc/{{pagename}}.rst">Edit on GitHub</a>
|
||||
<a href="https://github.com/saltstack/salt/edit/master/doc/{{pagename}}.rst">Edit on GitHub</a>
|
||||
</nav>
|
||||
<nav id="localnav">
|
||||
<ul class="nav navbar-nav">
|
||||
{%- block relbar_small %}{{ relbar() }}{% endblock %}
|
||||
|
||||
{% if not (build_type == "develop" or build_type == "next") and on_saltstack %}
|
||||
{% if not (build_type == "master" or build_type == "next") and on_saltstack %}
|
||||
<li><a class="icon-dl" href="/en/pdf/Salt-{{ release }}.pdf"><img height="25" width="25" class="nolightbox" src="{{ pathto('_static/images/pdf_icon.svg', 1) }}"></a></li>
|
||||
<li><a class="icon-dl" href="/en/epub/Salt-{{ release }}.epub"><img height="25" width="18" class="nolightbox" src="{{ pathto('_static/images/epub_icon.svg', 1) }}"></a></li>
|
||||
{% endif %}
|
||||
@ -202,9 +202,9 @@
|
||||
|
||||
<div class="alert alert-warning dev-notification-text" role="alert"><i class="glyphicon glyphicon-warning-sign"></i> These release notes are for an old release of Salt. This release might contain known security and other issues that are fixed in the <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Release notes for the latest release" href="{{ release }}.html">latest release</a>.</div>
|
||||
|
||||
{% elif build_type == "develop" and on_saltstack %}
|
||||
{% elif build_type == "master" and on_saltstack %}
|
||||
|
||||
<div class="alert alert-warning dev-notification-text" role="alert"><i class="glyphicon glyphicon-warning-sign"></i> You are viewing docs from the develop branch, some of these features are not yet released.</div>
|
||||
<div class="alert alert-warning dev-notification-text" role="alert"><i class="glyphicon glyphicon-warning-sign"></i> You are viewing docs from the master branch, some of these features are not yet released.</div>
|
||||
|
||||
{% elif build_type == "inactive" and on_saltstack %}
|
||||
|
||||
@ -244,16 +244,16 @@
|
||||
<p><i>{{ today }}</i></p>
|
||||
|
||||
{% if build_type == "latest" %}
|
||||
<p>You are viewing docs for the latest stable release, {{ latest_release }}. Switch to docs for the previous stable release, <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Docs for the previous stable release" href="/en/{{ previous_release_dir }}/">{{ previous_release }}</a>, or to a recent doc build from the <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Latest docs from the develop branch" href="/en/develop/">develop</a> branch.</p>
|
||||
<p>You are viewing docs for the latest stable release, {{ latest_release }}. Switch to docs for the previous stable release, <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Docs for the previous stable release" href="/en/{{ previous_release_dir }}/">{{ previous_release }}</a>, or to a recent doc build from the <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Latest docs from the master branch" href="/en/master/">master</a> branch.</p>
|
||||
|
||||
{% elif build_type == "previous" %}
|
||||
<p>You are viewing docs for the previous stable release, {{ previous_release }}. Switch to docs for the latest stable release, <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Docs for the latest stable release" href="/en/latest/">{{ latest_release }}</a>, or to a recent doc build from the <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Latest docs from the develop branch" href="/en/develop/">develop</a> branch.</p>
|
||||
<p>You are viewing docs for the previous stable release, {{ previous_release }}. Switch to docs for the latest stable release, <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Docs for the latest stable release" href="/en/latest/">{{ latest_release }}</a>, or to a recent doc build from the <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Latest docs from the master branch" href="/en/master/">master</a> branch.</p>
|
||||
|
||||
{% elif build_type == "inactive" %}
|
||||
<p>You are viewing docs for an inactive release, {{ previous_release }}. Switch to docs for the latest stable release, <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Docs for the latest stable release" href="/en/latest/">{{ latest_release }}</a>, or to a recent doc build from the <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Latest docs from the develop branch" href="/en/develop/">develop</a> branch.</p>
|
||||
<p>You are viewing docs for an inactive release, {{ previous_release }}. Switch to docs for the latest stable release, <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Docs for the latest stable release" href="/en/latest/">{{ latest_release }}</a>, or to a recent doc build from the <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Latest docs from the master branch" href="/en/master/">master</a> branch.</p>
|
||||
|
||||
{% elif build_type == "develop" %}
|
||||
<p>You are viewing docs built from a recent snapshot of the develop branch. Switch to docs for the latest stable release, <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Docs for the latest stable release" href="/en/latest/">{{ latest_release }}</a>.</p>
|
||||
{% elif build_type == "master" %}
|
||||
<p>You are viewing docs built from a recent snapshot of the master branch. Switch to docs for the latest stable release, <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Docs for the latest stable release" href="/en/latest/">{{ latest_release }}</a>.</p>
|
||||
|
||||
{% elif build_type == "next" %}
|
||||
<p>You are viewing preview docs for the next major release, {{ next_release }}. Switch to docs for the latest stable release, <a data-container="body" data-toggle="tooltip" data-placement="bottom" title="Docs for the latest stable release" href="/en/latest/">{{ latest_release }}</a>.</p>
|
||||
@ -307,7 +307,7 @@
|
||||
|
||||
<a class="btn btn-secondary{% if build_type == "latest" %} active{% endif %}" id="latest"{% if build_type == "latest" %} title="View release notes"{% else %} title="Switch to docs for the latest stable release"{% endif %} data-container="body" data-toggle="tooltip" data-placement="bottom" href="/en/latest/">{{ latest_release }}{% if build_type == "latest" %} <i class="glyphicon glyphicon-ok"></i>{% endif %}</a>
|
||||
|
||||
<a class="btn btn-secondary{% if build_type == "develop" %} active{% endif %}" id="develop"{% if build_type == "develop" %} title="View all release notes"{% endif %} title="Switch to docs built recently from the develop branch" data-container="body" data-toggle="tooltip" data-placement="bottom" href="/en/develop/">Develop{% if build_type == "develop" %} <i class="glyphicon glyphicon-ok"></i>{% endif %}</a>
|
||||
<a class="btn btn-secondary{% if build_type == "master" %} active{% endif %}" id="master"{% if build_type == "master" %} title="View all release notes"{% endif %} title="Switch to docs built recently from the master branch" data-container="body" data-toggle="tooltip" data-placement="bottom" href="/en/master/">Master{% if build_type == "master" %} <i class="glyphicon glyphicon-ok"></i>{% endif %}</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -125,7 +125,7 @@ $( document ).ready(function() {
|
||||
window.location.href = window.location.href.replace($currentVer.attr("href"), clickedVer);
|
||||
}
|
||||
else {
|
||||
if ($currentVer.text().indexOf("Develop") == -1) {
|
||||
if ($currentVer.text().indexOf("Master") == -1) {
|
||||
window.location.href = clickedVer + "topics/releases/" + $currentVer.text().trim() + ".html";
|
||||
}
|
||||
else window.location.href = clickedVer + "topics/releases/";
|
||||
|
27
doc/conf.py
27
doc/conf.py
@ -263,22 +263,31 @@ if on_saltstack:
|
||||
copyright = time.strftime("%Y")
|
||||
|
||||
# < --- START do not merge these settings to other branches START ---> #
|
||||
build_type = 'previous' # latest, previous, develop, next
|
||||
release = previous_release # version, latest_release, previous_release
|
||||
build_type = 'previous' # latest, previous, master, next
|
||||
# < --- END do not merge these settings to other branches END ---> #
|
||||
|
||||
# Set google custom search engine
|
||||
|
||||
if release == latest_release:
|
||||
if build_type == 'master':
|
||||
release = latest_release
|
||||
search_cx = '011515552685726825874:v1had6i279q' # master
|
||||
#search_cx = '011515552685726825874:x17j5zl74g8' # develop
|
||||
elif build_type == 'next':
|
||||
release = next_release
|
||||
search_cx = '011515552685726825874:ht0p8miksrm' # latest
|
||||
elif release.startswith('2018.3'):
|
||||
elif build_type == 'previous':
|
||||
release = previous_release
|
||||
if release.startswith('2018.3'):
|
||||
search_cx = '011515552685726825874:vadptdpvyyu' # 2018.3
|
||||
elif release.startswith('2017.7'):
|
||||
elif release.startswith('2017.7'):
|
||||
search_cx = '011515552685726825874:w-hxmnbcpou' # 2017.7
|
||||
elif release.startswith('2016.11'):
|
||||
elif release.startswith('2016.11'):
|
||||
search_cx = '011515552685726825874:dlsj745pvhq' # 2016.11
|
||||
else:
|
||||
search_cx = '011515552685726825874:x17j5zl74g8' # develop
|
||||
else:
|
||||
search_cx = '011515552685726825874:ht0p8miksrm' # latest
|
||||
else: # latest or something else
|
||||
release = latest_release
|
||||
search_cx = '011515552685726825874:ht0p8miksrm' # latest
|
||||
|
||||
needs_sphinx = '1.3'
|
||||
|
||||
@ -356,7 +365,7 @@ rst_prolog = """\
|
||||
|
||||
# A shortcut for linking to tickets on the GitHub issue tracker
|
||||
extlinks = {
|
||||
'blob': ('https://github.com/saltstack/salt/blob/%s/%%s' % 'develop', None),
|
||||
'blob': ('https://github.com/saltstack/salt/blob/%s/%%s' % 'master', None),
|
||||
'issue': ('https://github.com/saltstack/salt/issues/%s', 'issue #'),
|
||||
'pull': ('https://github.com/saltstack/salt/pull/%s', 'PR #'),
|
||||
'formula_url': ('https://github.com/saltstack-formulas/%s', ''),
|
||||
|
Loading…
Reference in New Issue
Block a user