Skip to content

Commit e162a4e

Browse files
committed
switch the docs Sphinx theme from alabaster to RTD theme
https://sphinx-rtd-theme.readthedocs.io/
1 parent b0d1ee3 commit e162a4e

File tree

11 files changed

+105
-88
lines changed

11 files changed

+105
-88
lines changed

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,13 @@ About
1717

1818
This is a collection of drop-in Python [Flask](https://flask.palletsprojects.com/) views for the initial [OAuth](http://oauth.net/) client flows for many popular sites, including Blogger, Disqus, Dropbox, Facebook, Flickr, GitHub, Google, IndieAuth, Instagram, LinkedIn, Mastodon, Medium, Tumblr, Twitter, and WordPress.com.
1919

20-
* [Available on PyPi.](https://pypi.python.org/pypi/oauth-dropins/) Install with `pip install oauth-dropins`.
21-
* [Click here for getting started docs.](#quick-start)
22-
* [Click here for reference docs.](https://oauth-dropins.readthedocs.io/en/latest/source/oauth_dropins.html)
23-
* A demo app is deployed at [oauth-dropins.appspot.com](http://oauth-dropins.appspot.com/).
24-
2520
oauth-dropins stores user credentials in [Google Cloud Datastore](https://cloud.google.com/datastore/). It's primarily designed for [Google App Engine](https://appengine.google.com/), but it can be used in any Python web application, regardless of host or framework.
2621

27-
[Versions 3.0](https://pypi.org/project/oauth-dropins/3.0/) and above support App Engine's [Python 3 runtimes](https://cloud.google.com/appengine/docs/python/), both [Standard](https://cloud.google.com/appengine/docs/standard/python3/) and [Flexible](https://cloud.google.com/appengine/docs/flexible/python/). If you're on the [Python 2 runtime](https://cloud.google.com/appengine/docs/standard/python/), use [version 2.2](https://pypi.org/project/oauth-dropins/2.2/).
28-
29-
If you clone the repo directly or want to contribute, see [Development](#development) for setup instructions.
22+
* [Available on PyPi.](https://pypi.python.org/pypi/oauth-dropins/) Install with `pip install oauth-dropins`.
23+
* [Getting started docs.](#quick-start)
24+
* [Reference docs.](https://oauth-dropins.readthedocs.io/en/latest/source/oauth_dropins.html)
25+
* Demo app at [oauth-dropins.appspot.com](http://oauth-dropins.appspot.com/).
26+
* [Source code on GitHub.](https://github.com/snarfed/oauth-dropins/)
3027

3128
This software is released into the public domain. See LICENSE for details.
3229

@@ -391,5 +388,7 @@ Here's how to package, test, and ship a new release. (Note that this is [largely
391388

392389
Related work
393390
---
394-
* [Python Social Auth](https://python-social-auth.readthedocs.io/en/latest/)
395391
* [Loginpass](https://github.com/authlib/loginpass)/[Authlib](https://authlib.org/)
392+
* [Authomatic](https://authomatic.github.io/authomatic/)
393+
* [Python Social Auth](https://python-social-auth.readthedocs.io/en/latest/)
394+
* [Authl](https://authl.readthedocs.io/en/stable/)

docs/_static/custom.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.icon-home {
2+
font-size: larger !important;
3+
}
4+
5+
.wy-nav-side, .wy-side-nav-search > div.version {
6+
color:#fcfcfc;
7+
}
8+
9+
.rst-content code, .rst-content tt, code {
10+
border: none;
11+
padding: 0;
12+
}
13+
14+
/* The first link in the reference doc TOC is the page title/header. Hide that. */
15+
#contents #id1 {
16+
display: none;
17+
}
18+
19+
/* The first link in the sidebar TOC is the page title/header. Hide that. */
20+
.local-toc ul:nth-child(3) li:first-child {
21+
display: none;
22+
}

docs/_templates/breadcrumbs.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<hr/>

docs/_templates/description.html

Lines changed: 0 additions & 39 deletions
This file was deleted.

docs/_templates/layout.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{% extends "!layout.html" %}
2+
3+
{%- block navigation %}
4+
5+
6+
<div style="width: 300px; text-align: center; font-size: larger">
7+
8+
<p>Drop-in Python OAuth client flows for Flask on Google Cloud.</p>
9+
10+
<!---
11+
<p>
12+
<a href="https://circleci.com/gh/snarfed/oauth-dropins">
13+
<img alt="Tests on Circle CI" src="https://circleci.com/gh/snarfed/oauth-dropins.svg?style=svg" />
14+
</a>
15+
16+
<a href="https://coveralls.io/github/snarfed/oauth-dropins?branch=master">
17+
<img alt="Coverage on Coveralls" src="https://coveralls.io/repos/github/snarfed/oauth-dropins/badge.svg?branch=master" />
18+
</a>
19+
</p>
20+
-->
21+
</div>
22+
23+
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="{{ _('Navigation menu') }}">
24+
<div class="local-toc">
25+
<ul>
26+
<li><a href="{{ pathto('index') }}">Getting started</a></li>
27+
<li><a href="{{ pathto('source/oauth_dropins') }}">oauth_dropins reference</a></li>
28+
<li><a href="{{ pathto('source/oauth_dropins.webutil') }}">webutil reference</a></li>
29+
</ul>
30+
<hr style="margin: 1em">
31+
{{ toc }}
32+
</div>
33+
</div>
34+
35+
36+
{%- endblock %}

docs/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ cd `dirname $absfile`
2020
rm -f index.rst
2121
cat > index.rst <<EOF
2222
oauth-dropins
23-
=============
23+
-------------
2424
2525
EOF
2626

27-
tail -n +15 ../README.md \
27+
tail -n +17 ../README.md \
2828
| pandoc --from=markdown --to=rst \
2929
| sed -E 's/```/`/; s/`` </ </' \
3030
>> index.rst

docs/conf.py

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# All configuration values have a default; values that are commented out
1212
# serve to show the default.
1313

14+
import sphinx_rtd_theme
1415
import sys
1516
import os
1617

@@ -37,6 +38,7 @@
3738
'sphinx.ext.intersphinx',
3839
# 'sphinx.ext.coverage',
3940
'sphinx.ext.viewcode',
41+
'sphinx_rtd_theme',
4042
]
4143

4244
# autodoc settings
@@ -141,12 +143,15 @@
141143

142144
# The theme to use for HTML and HTML Help pages. See the documentation for
143145
# a list of builtin themes.
144-
html_theme = 'alabaster'
146+
html_theme = "sphinx_rtd_theme"
145147

146148
# Theme options are theme-specific and customize the look and feel of a theme
147149
# further. For a list of options available for each theme, see the
148150
# documentation.
149-
#html_theme_options = {}
151+
# https://sphinx-rtd-theme.readthedocs.io/en/stable/configuring.html
152+
html_theme_options = {
153+
'collapse_navigation': False,
154+
}
150155

151156
# Add any paths that contain custom themes here, relative to this directory.
152157
#html_theme_path = []
@@ -160,7 +165,7 @@
160165

161166
# The name of an image file (relative to this directory) to place at the top
162167
# of the sidebar.
163-
html_logo = '../oauth_dropins/static/oauth_shiny.png'
168+
html_logo = '../oauth_dropins/static/oauth_shiny_128.png'
164169

165170
# The name of an image file (within the static path) to use as favicon of the
166171
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
@@ -190,6 +195,15 @@
190195
'**': ['description.html', 'localtoc.html', 'searchbox.html'],
191196
}
192197

198+
# These folders are copied to the documentation's HTML output
199+
html_static_path = ['_static']
200+
201+
# These paths are either relative to html_static_path
202+
# or fully qualified paths (eg. https://...)
203+
# https://docs.readthedocs.io/en/stable/guides/adding-custom-css.html
204+
html_css_files = [
205+
'custom.css',
206+
]
193207
# Additional templates that should be rendered to pages, maps page names to
194208
# template names.
195209
#html_additional_pages = {}

docs/index.rst

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
oauth-dropins
2-
=============
3-
4-
About
5-
-----
2+
-------------
63

74
This is a collection of drop-in Python
85
`Flask <https://flask.palletsprojects.com/>`__ views for the initial
@@ -11,32 +8,21 @@ including Blogger, Disqus, Dropbox, Facebook, Flickr, GitHub, Google,
118
IndieAuth, Instagram, LinkedIn, Mastodon, Medium, Tumblr, Twitter, and
129
WordPress.com.
1310

14-
- `Available on PyPi. <https://pypi.python.org/pypi/oauth-dropins/>`__
15-
Install with ``pip install oauth-dropins``.
16-
- `Click here for getting started docs. <#quick-start>`__
17-
- `Click here for reference
18-
docs. <https://oauth-dropins.readthedocs.io/en/latest/source/oauth_dropins.html>`__
19-
- A demo app is deployed at
20-
`oauth-dropins.appspot.com <http://oauth-dropins.appspot.com/>`__.
21-
2211
oauth-dropins stores user credentials in `Google Cloud
2312
Datastore <https://cloud.google.com/datastore/>`__. It’s primarily
2413
designed for `Google App Engine <https://appengine.google.com/>`__, but
2514
it can be used in any Python web application, regardless of host or
2615
framework.
2716

28-
`Versions 3.0 <https://pypi.org/project/oauth-dropins/3.0/>`__ and above
29-
support App Engine’s `Python 3
30-
runtimes <https://cloud.google.com/appengine/docs/python/>`__, both
31-
`Standard <https://cloud.google.com/appengine/docs/standard/python3/>`__
32-
and
33-
`Flexible <https://cloud.google.com/appengine/docs/flexible/python/>`__.
34-
If you’re on the `Python 2
35-
runtime <https://cloud.google.com/appengine/docs/standard/python/>`__,
36-
use `version 2.2 <https://pypi.org/project/oauth-dropins/2.2/>`__.
37-
38-
If you clone the repo directly or want to contribute, see
39-
`Development <#development>`__ for setup instructions.
17+
- `Available on PyPi. <https://pypi.python.org/pypi/oauth-dropins/>`__
18+
Install with ``pip install oauth-dropins``.
19+
- `Getting started docs. <#quick-start>`__
20+
- `Reference
21+
docs. <https://oauth-dropins.readthedocs.io/en/latest/source/oauth_dropins.html>`__
22+
- Demo app at
23+
`oauth-dropins.appspot.com <http://oauth-dropins.appspot.com/>`__.
24+
- `Source code on
25+
GitHub. <https://github.com/snarfed/oauth-dropins/>`__
4026

4127
This software is released into the public domain. See LICENSE for
4228
details.
@@ -662,6 +648,8 @@ too <https://github.com/snarfed/granary#release-instructions>`__.)
662648
Related work
663649
------------
664650

651+
- `Loginpass <https://github.com/authlib/loginpass>`__/`Authlib <https://authlib.org/>`__
652+
- `Authomatic <https://authomatic.github.io/authomatic/>`__
665653
- `Python Social
666654
Auth <https://python-social-auth.readthedocs.io/en/latest/>`__
667-
- `Loginpass <https://github.com/authlib/loginpass>`__/`Authlib <https://authlib.org/>`__
655+
- `Authl <https://authl.readthedocs.io/en/stable/>`__

docs/source/oauth_dropins.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
oauth_dropins
2-
=============
2+
-------------
33

44
Reference documentation.
55

6-
.. toctree::
7-
oauth_dropins
8-
6+
.. contents::
97

108
blogger
119
-------

docs/source/oauth_dropins.webutil.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
oauth_dropins.webutil
2-
=============================
1+
webutil
2+
-------
33

44
Reference documentation.
55

6-
.. toctree::
7-
oauth_dropins.webutil
8-
6+
.. contents::
97

108
flask_util
119
----------

oauth_dropins/webutil

Submodule webutil updated 1 file

0 commit comments

Comments
 (0)