Skip to content

Commit

Permalink
misc doc tweaks
Browse files Browse the repository at this point in the history
...including workaround for RTD CSS bug for github ribbon and badges on mobile: readthedocs/sphinx_rtd_theme#144
  • Loading branch information
snarfed committed Nov 22, 2016
1 parent a4ffea0 commit cd18d98
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
12 changes: 12 additions & 0 deletions docs/_templates/description.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,15 @@ <h3>granary</h3>
alt="Fork me on GitHub" />
</a>

<style>
/* Workaround for https://github.com/snide/sphinx_rtd_theme/issues/144
* Override bad rule in https://media.readthedocs.org/css/badge_only.css that
* sets all images to width 100% on narrow screens.
* TODO: remove when bug is fixed!
*/
@media screen and (max-width: 768px) {
img {
width: auto;
}
}
</style>
7 changes: 2 additions & 5 deletions docs/build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/bin/bash
#
# Preprocesses docs and runs Sphinx (apidoc and build) to build the HTML docs.
#
# Still imperfect. After pandoc generates index.rst, you need to revise the
# header and remove the manual TOC and the footer images.
set -e

absfile=`readlink -f $0`
Expand All @@ -14,8 +11,8 @@ cd `dirname $absfile`

rm -f index.rst
cat > index.rst <<EOF
granary
=======
granary documentation
=====================
EOF

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

import sys
import os
import shlex

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down Expand Up @@ -324,8 +323,9 @@
intersphinx_mapping = {
# TODO
# 'appengine': ('https://cloud.google.com/appengine/docs/python/refdocs', None),
'oauth_dropins': ('https://oauth-dropins.readthedocs.io/en/latest', None),
'python': ('https://docs.python.org/', None),
'requests': ('http://docs.python-requests.org/en/latest', None),
'urllib3': ('http://urllib3.readthedocs.io/en/latest', None),
'urllib3': ('https://urllib3.readthedocs.io/en/latest', None),
'webapp2': ('https://webapp2.readthedocs.io/en/latest', None),
}

0 comments on commit cd18d98

Please sign in to comment.