Compare commits

..
5 Commits
5 changed files with 41 additions and 7 deletions

No files matched your search

+20
View File
@@ -49,6 +49,15 @@ In your ``conf.py`` file:
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
You may also specify a canonical url in conf.py to let search engines know
they should give higher ranking to latest version of the docs:
.. code:: python
html_theme_options['canonical_url'] = 'http://domain.tld/latest/docs/'
The url points to the root of the documentation. It requires a trailing slash.
Via git or download
-------------------
@@ -97,6 +106,17 @@ Changelog
master
------
v0.2.3
------
* Temporarily patch Sphinx issue with ``singlehtml`` builder by inspecting the
builder in template.
v0.2.2
------
* Roll back toctree fix in 0.2.1 (#367). This didn't fix the issue and
introduced another bug with toctrees display.
v0.2.1
------
+1 -1
View File
@@ -5,7 +5,7 @@ From https://github.com/ryan-roemer/sphinx-bootstrap-theme.
"""
import os
__version__ = '0.2.2'
__version__ = '0.2.3'
__version_full__ = __version__
+15 -5
View File
@@ -22,6 +22,10 @@
{% if favicon %}
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
{% endif %}
{# CANONICAL URL #}
{% if theme_canonical_url %}
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
{% endif %}
{# CSS #}
@@ -121,12 +125,18 @@
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
{% block menu %}
{% set toctree = toctree(maxdepth=theme_navigation_depth|int, collapse=theme_collapse_navigation, includehidden=True) %}
{% if toctree %}
{{ toctree }}
{#
The singlehtml builder doesn't handle this toctree call when the
toctree is empty. Skip building this for now.
#}
{% if builder != 'singlehtml' %}
{% set global_toc = toctree(maxdepth=theme_navigation_depth|int, collapse=theme_collapse_navigation, includehidden=True) %}
{% endif %}
{% if global_toc %}
{{ global_toc }}
{% else %}
<!-- Local TOC -->
<div class="local-toc">{{ toc }}</div>
<!-- Local TOC -->
<div class="local-toc">{{ toc }}</div>
{% endif %}
{% endblock %}
</div>
+3
View File
@@ -126,6 +126,9 @@
{%- if favicon %}
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
{%- endif %}
{%- if theme_canonical_url %}
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
{%- endif %}
{%- endif %}
{%- block linktags %}
{%- if hasdoc('about') %}
+2 -1
View File
@@ -4,10 +4,11 @@ stylesheet = css/theme.css
[options]
typekit_id = hiw1hhg
analytics_id =
analytics_id =
sticky_navigation = False
logo_only =
collapse_navigation = False
display_version = True
navigation_depth = 4
prev_next_buttons_location = bottom
canonical_url =