diff options
author | Jack Lloyd <[email protected]> | 2017-01-07 11:42:14 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-01-07 11:42:14 -0500 |
commit | 02f0a1197c78f4289cd9d2093c6c50058cbbfdc6 (patch) | |
tree | c985a681542c51f53105034f776b87b05f7f4b6e /src/build-data | |
parent | c46692e9562e0faa6961532c21998d5cd5c2ee20 (diff) |
Switch to readthedocs Sphinx theme
Move some text and change some headers to look better with how rtd
theme formats the table of contents.
GH #822
Diffstat (limited to 'src/build-data')
-rw-r--r-- | src/build-data/sphinx/conf.py | 35 | ||||
-rw-r--r-- | src/build-data/sphinx/disqus/page.html | 21 |
2 files changed, 11 insertions, 45 deletions
diff --git a/src/build-data/sphinx/conf.py b/src/build-data/sphinx/conf.py index 97dc67ca8..71c032b4b 100644 --- a/src/build-data/sphinx/conf.py +++ b/src/build-data/sphinx/conf.py @@ -21,7 +21,6 @@ def check_for_tag(tag): return False is_website_build = check_for_tag('website') -use_disqus = is_website_build and check_for_tag('disqus') needs_sphinx = '1.1' @@ -29,9 +28,6 @@ extensions = ['sphinx.ext.extlinks'] templates_path = ['templates'] -if is_website_build and use_disqus: - templates_path += ['disqus'] - files_dir = 'https://botan.randombit.net/releases' extlinks = { @@ -42,8 +38,6 @@ extlinks = { 'tgz': (files_dir + '/Botan-%s.tgz', 'tar/gz for '), 'tgz_sig': (files_dir + '/Botan-%s.tgz.asc', 'tar/gz sig '), -# 'tbz': (files_dir + '/Botan-%s.tbz', 'tar/bzip for '), -# 'tbz_sig': (files_dir + '/Botan-%s.tbz.asc', 'tar/bzip sig '), 'installer_x86_32': (files_dir + '/win32/botan-%s-x86_32.exe', 'x86-32 '), 'installer_x86_64': (files_dir + '/win32/botan-%s-x86_64.exe', 'x86-64 '), @@ -59,7 +53,7 @@ source_encoding = 'utf-8-sig' master_doc = 'contents' project = u'botan' -copyright = u'2000-2016, Jack Lloyd' +copyright = u'2000-2017, The Botan Authors' version = '%d.%d' % (botan_version.release_major, botan_version.release_minor) @@ -101,23 +95,16 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'agogo' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -html_theme_options = { - 'linkcolor': 'blue', - 'headerlinkcolor': 'blue', - 'headercolor1': 'darkblue', - 'headercolor2': 'darkblue', - 'textalign': 'left', - 'pagewidth': '70em', - 'documentwidth': '50em' - } - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] + +try: + # On Arch this is python-sphinx_rtd_theme + import sphinx_rtd_theme + html_theme = "sphinx_rtd_theme" + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +except ImportError as e: + html_theme = 'agogo' + html_theme_path = [] + print("Ignoring ImportError and using old theme") # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". diff --git a/src/build-data/sphinx/disqus/page.html b/src/build-data/sphinx/disqus/page.html deleted file mode 100644 index 56e102044..000000000 --- a/src/build-data/sphinx/disqus/page.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "!page.html" %} - -{% block body %} -{{ super() }} - -<div id="disqus_thread"></div> -<script type="text/javascript"> - var disqus_shortname = 'botan'; - - var disqus_identifier = 'botan_{{ pagename }}'; - var disqus_url = 'http://botan.randombit.net/{{ pagename }}.html'; - - (function() { - var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; - dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; - (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); - })(); -</script> -<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> - -{% endblock %} |