mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2026-10-15 19:02:01 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4dc19dc62a | ||
|
|
f71a918705 | ||
|
|
0af470f7cf | ||
|
|
82484eb5b5 | ||
|
|
543b4d8372 |
No files matched your search
+20
@@ -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
|
||||
------
|
||||
|
||||
@@ -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__
|
||||
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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') %}
|
||||
|
||||
@@ -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 =
|
||||
Reference in new issue
Block a user