diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..826ceba --- /dev/null +++ b/.gitignore @@ -0,0 +1,61 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +.env/ diff --git a/README.rst b/README.rst index 1ce3b67..160c47c 100644 --- a/README.rst +++ b/README.rst @@ -169,6 +169,12 @@ Variables and feature toggles ``"account/repo"`` string - used to display a `Codecov`_ build status button in the sidebar. If ``true``, uses your ``github_(user|repo)`` settings; defaults to ``false.`` +* ``rtd_button``: ``true``, ``false`` or ``github_repo`` string -- used to display a `ReadTheDocs`_ + status button in the sidebar. If ``true``, uses your + ``github_repo`` settings; defaults to ``false.`` +* ``pypi_button``: ``true``, ``false`` or ``github_repo`` string -- used to display a `PyPi`_ + status button in the sidebar. If ``true``, uses your + ``github_repo`` settings; defaults to ``false.`` * ``gratipay_user``: Set to your `Gratipay `_ username if you want a Gratipay 'Donate' section in your sidebar. @@ -473,3 +479,5 @@ Changelog .. _Codecov: https://codecov.io .. _Sphinx: http://sphinx-doc.org +.. _ReadTheDocs: https://readthedocs.org/ +.. _PyPi: https://pypi.python.org/pypi diff --git a/alabaster/_version.py b/alabaster/_version.py index e77b4c8..a8b0baf 100644 --- a/alabaster/_version.py +++ b/alabaster/_version.py @@ -1,2 +1,2 @@ -__version_info__ = (0, 7, 7) +__version_info__ = (0, 7, 8) __version__ = '.'.join(map(str, __version_info__)) diff --git a/alabaster/about.html b/alabaster/about.html index c92560d..e1f07e0 100644 --- a/alabaster/about.html +++ b/alabaster/about.html @@ -55,3 +55,35 @@

{{ project }}

{% endif %} + +{% if theme_rtd_button|lower != 'false' %} +{% if theme_rtd_button|lower == 'true' %} + {% set path = theme_github_repo %} +{% else %} + {% set path = theme_rtd_button %} +{% endif %} +

+ + https://readthedocs.org/projects/{{ path }}/badge/?version=lastest + +

+{% endif %} + +{% if theme_pypi_button|lower != 'false' %} +{% if theme_pypi_button|lower == 'true' %} + {% set path = theme_github_repo %} +{% else %} + {% set path = theme_pypi_button %} +{% endif %} +

+ + https://img.shields.io/pypi/v/{{ path }}.svg + +

+{% endif %} diff --git a/alabaster/theme.conf b/alabaster/theme.conf index 5b0abb9..8026fbb 100644 --- a/alabaster/theme.conf +++ b/alabaster/theme.conf @@ -17,6 +17,8 @@ github_type = watch github_count = true travis_button = false codecov_button = false +rtd_button = false +pypi_button = false gratipay_user = gittip_user = analytics_id =