Skip to content

Commit f6b36a8

Browse files
committed
only include specific version in one file to minimize update churn
1 parent 5f7f0c4 commit f6b36a8

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

api-docs/source/conf.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
sys.path.insert(0, bnpath)
3030
import binaryninja
3131
binaryninja._init_plugins() #force license check
32-
binaryninja.core_serial = "REDACTED"
3332

3433
def modulelist(modulename):
3534
modules = inspect.getmembers(modulename, inspect.ismodule)
@@ -144,8 +143,8 @@ def generaterst():
144143
# built documents.
145144
#
146145
# The short X.Y version.
147-
version = u'.'.join(unicode(binaryninja.core_version).split('.')[0:2])
148-
release = unicode(binaryninja.core_version)
146+
version = u'.'.join(unicode(binaryninja.core_version()).split('.')[0:2])
147+
release = unicode(binaryninja.core_version())
149148

150149
language = 'en'
151150

@@ -192,11 +191,11 @@ def generaterst():
192191
# The name for this set of Sphinx documents.
193192
# "<project> v<release> documentation" by default.
194193
#
195-
# html_title = u'Binary Ninja Documentation v1.0.1'
194+
html_title = u'Binary Ninja API Documentation v' + version
196195

197196
# A shorter title for the navigation bar. Default is the same as html_title.
198197
#
199-
# html_short_title = None
198+
html_short_title = u'BN API'
200199

201200
# The name of an image file (relative to this directory) to place at the top
202201
# of the sidebar.
@@ -207,7 +206,7 @@ def generaterst():
207206
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
208207
# pixels large.
209208
#
210-
# html_favicon = None
209+
html_favicon = u'../../docs/img/favicon.ico'
211210

212211
# Add any paths that contain custom static files (such as style sheets) here,
213212
# relative to this directory. They are copied after the builtin static files,
@@ -258,7 +257,7 @@ def generaterst():
258257

259258
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
260259
#
261-
# html_show_sphinx = True
260+
html_show_sphinx = False
262261

263262
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
264263
#

sphinx_rtd_theme/layout.html

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,12 @@
109109
{% endif %}
110110
{% if nav_version %}
111111
<div class="version">
112-
{{ nav_version }}
112+
<script>
113+
window.addEventListener("load", function() {
114+
var ver = document.getElementsByClassName("version");
115+
ver[0].innerHTML = DOCUMENTATION_OPTIONS['VERSION'];
116+
});
117+
</script>
113118
</div>
114119
{% endif %}
115120
{% endif %}
@@ -164,16 +169,6 @@
164169

165170
{% if not embedded %}
166171

167-
<!-- <script type="text/javascript">
168-
var DOCUMENTATION_OPTIONS = {
169-
URL_ROOT:'{{ url_root }}',
170-
VERSION:'{{ release|e }}',
171-
COLLAPSE_INDEX:false,
172-
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
173-
HAS_SOURCE: {{ has_source|lower }}
174-
};
175-
</script>
176-
-->
177172
{% if sphinx_version >= "1.8.0" %}
178173
<script type="text/javascript" id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
179174
{%- for scriptfile in script_files %}

0 commit comments

Comments
 (0)