Switch to the readthedocs sphinx theme.
This commit is contained in:
@@ -28,4 +28,4 @@ sphinx-apidoc -f -o docs/source oauth2client
|
|||||||
cd docs
|
cd docs
|
||||||
make html
|
make html
|
||||||
cd ..
|
cd ..
|
||||||
ghp-import -n docs/_build/html
|
|
||||||
|
|||||||
28
docs/_templates/layout.html
vendored
28
docs/_templates/layout.html
vendored
@@ -1,28 +0,0 @@
|
|||||||
{% extends "!layout.html" %}
|
|
||||||
|
|
||||||
{# Custom CSS overrides #}
|
|
||||||
{# set bootswatch_css_custom = ['_static/my-styles.css'] #}
|
|
||||||
|
|
||||||
{# Add github banner (from: https://github.com/codepo8/css-fork-on-github-ribbon). #}
|
|
||||||
{% block header %}
|
|
||||||
{{ super() }}
|
|
||||||
|
|
||||||
<a href="https://github.com/google/oauth2client"
|
|
||||||
class="visible-desktop hidden-xs">
|
|
||||||
<img id="gh-banner"
|
|
||||||
style="position:absolute; right:0; border:0; width:149px; height:149px;"
|
|
||||||
src="http://aral.github.com/fork-me-on-github-retina-ribbons/right-grey@2x.png"
|
|
||||||
alt="Fork me on GitHub">
|
|
||||||
</a>
|
|
||||||
<script>
|
|
||||||
// Adjust banner height.
|
|
||||||
$(function () {
|
|
||||||
var navHeight = $(".navbar .container").css("height");
|
|
||||||
$("#gh-banner").css("top", navHeight);
|
|
||||||
var navZ = $(".container").css("z-index");
|
|
||||||
navZ = (navZ === "auto") ? 10 : navZ + 10;
|
|
||||||
$("#gh-banner").css("z-index", navZ);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
11
docs/conf.py
11
docs/conf.py
@@ -39,12 +39,11 @@ if django.VERSION[1] < 7:
|
|||||||
|
|
||||||
# -- Options for HTML output ----------------------------------------------
|
# -- Options for HTML output ----------------------------------------------
|
||||||
|
|
||||||
import sphinx_bootstrap_theme
|
# We want to set the RTD theme, but not if we're on RTD.
|
||||||
html_theme = 'bootstrap'
|
if os.environ.get('READTHEDOCS', '') != 'True':
|
||||||
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
|
import sphinx_rtd_theme
|
||||||
html_theme_options = {
|
html_theme = 'sphinx_rtd_theme'
|
||||||
'bootswatch_theme': 'flatly',
|
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||||
}
|
|
||||||
|
|
||||||
html_static_path = ['_static']
|
html_static_path = ['_static']
|
||||||
html_logo = '_static/google_logo.png'
|
html_logo = '_static/google_logo.png'
|
||||||
|
|||||||
10
tox.ini
10
tox.ini
@@ -40,13 +40,19 @@ deps =
|
|||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
deps =
|
deps =
|
||||||
{[testenv:cover]deps}
|
{[testenv:cover]deps}
|
||||||
ghp-import
|
|
||||||
python-gflags
|
python-gflags
|
||||||
pyyaml
|
pyyaml
|
||||||
sphinx
|
sphinx
|
||||||
sphinx-bootstrap-theme
|
sphinx-rtd-theme
|
||||||
commands = ./doc-build
|
commands = ./doc-build
|
||||||
|
|
||||||
|
[testenv:pushdocs]
|
||||||
|
basepython = python2.7
|
||||||
|
deps =
|
||||||
|
{[testenv:docs]deps}
|
||||||
|
ghp-import
|
||||||
|
commands = ./push-docs
|
||||||
|
|
||||||
[testenv:py26]
|
[testenv:py26]
|
||||||
basepython = python2.6
|
basepython = python2.6
|
||||||
deps = {[testenv]basedeps}
|
deps = {[testenv]basedeps}
|
||||||
|
|||||||
Reference in New Issue
Block a user