Skip to main content

Sphinx themes for Pylons Project documentation.

Project description

Pylons Sphinx Themes

This repository is a Python package that contains Sphinx themes for Pylons related projects. This project is based on Pylons Sphinx Theme (singular), but uses a package implementation instead of git submodules and manual steps.

To use a theme in your Sphinx documentation, follow this guide.

Edit your project’s setup.py

  1. Add pylons-sphinx-themes to your project’s requirements in its setup.py. Here’s an example from Pyramid.

    docs_extras = [
        'Sphinx >= 1.3.1', # Read The Docs minimum version
        'docutils',
        'repoze.sphinx.autointerface',
        'pylons-sphinx-themes',
        ]

Edit your Sphinx’s conf.py

  1. Near the top, add the following.

    import pylons_sphinx_themes
  2. Activate the theme.

    html_theme = 'pyramid'
    html_theme_path = pylons_sphinx_themes.get_html_themes_path()
  3. If you were previously using the git submodule method to use the Pylons theme, then comment or delete the block of code under the following statement.

    # Add and use Pylons theme
    if 'sphinx-build' in ' '.join(sys.argv):  # protect against dumb importers
  4. (Optional) Set a canonical root URL. The URL points to the root of the documentation, and requires a trailing slash.

    html_theme_options = dict(
        canonical_url='http://the_root_domain/latest/docs/'
    )

Undo git submodule method

If you were previously using the git submodule method to use the Pylons theme, then perform the following additional steps.

  1. Remove .gitmodules.

    cd <your_project_directory>
    git rm .gitmodules
  2. Deinitialize the submodule.

    cd docs/_themes
    git submodule deinit .
  3. Remove the submodule’s directory.

    cd ..
    git rm _themes/
  4. Edit your Sphinx’s Makefile. The following is an example diff from Pyramid.

    -html: themes
    +html:
    # ...
    -htmlhelp: themes
    +htmlhelp:
    #...
    -themes:
    -    cd ..; git submodule update --init --recursive; cd docs;

Update tox.ini

If you use tox, you can specify dependencies for building your docs either in your setup.py (preferred) or in your tox.ini (duplicitous). See the example from Pyramid.

docs_extras = [
    'Sphinx >= 1.3.1',
    'docutils',
    'repoze.sphinx.autointerface',
    'pylons_sphinx_latesturl',
    'pylons-sphinx-themes',
    ]

# ...

extras_require = {
    'testing':testing_extras,
    'docs':docs_extras,
    },

Otherwise you can repeat yourself and edit your tox.ini. The following example is from waitress.

deps =
    Sphinx
    repoze.sphinx.autointerface
    pylons-sphinx-themes

Update Read the Docs configuration

If you specify package requirements for Read the Docs, specify dependencies in your rtd.txt. You can either name them explicitly, which might be duplicitous:

pylons-sphinx-themes

or you can rely on your setup.py configuration, specifying dependencies in only one place, by simply using this in your rtd.txt.

-e .[docs]

Available themes

  • pylons - the generic Pylons Project documentation theme

  • pyramid - the specific Pyramid documentation theme

  • pylonsfw - the specific Pylons Framework documentation theme

Change log for pylons-sphinx-themes

1.0.6 (2017-09-22)

  • Update zest.releaser in order to release to PyPI.

1.0.5 (2017-09-22)

1.0.4 (2017-06-20)

  • Specify line spacing for list items for only within the .body class.

1.0.3 (2017-06-20)

  • Add line spacing for list items. Closes #4.

1.0.2 (2017-06-16)

  • Remove HTTPS protocol to allow either HTTPS or HTTP.

1.0.1 (2017-06-16)

  • Use HTTPS for protocol of stylesheets.

1.0 (2017-04-18)

  • Use zest.releaser for releasing.

  • Improve documentation.

0.3.1 (2015-04-15)

  • Improve documentation.

0.3 (2015-04-15)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylons-sphinx-themes-1.0.6.tar.gz (140.8 kB view details)

Uploaded Source

Built Distribution

pylons_sphinx_themes-1.0.6-py2.py3-none-any.whl (139.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pylons-sphinx-themes-1.0.6.tar.gz.

File metadata

File hashes

Hashes for pylons-sphinx-themes-1.0.6.tar.gz
Algorithm Hash digest
SHA256 2fc29def153594e0f5e7facf674a8aa9e9a60ca1617cc9db234fa9204ee461ec
MD5 4585a8032eee440fa1d89f9cf945b58b
BLAKE2b-256 cab3cc202827dc6c1cb3ff17870d480168ab2f82677a468e5e4b03cbed62dcd6

See more details on using hashes here.

File details

Details for the file pylons_sphinx_themes-1.0.6-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pylons_sphinx_themes-1.0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f1f08370d6e3f507c571ed577568c25a29a9d003c9e871bede0bbe64cb07de6f
MD5 639e8513d5ea5492c5e2d754e55c9ae2
BLAKE2b-256 570bd40d23e720359c31d86272f307e4fac09318d1e17d179b2ab52dc994a30e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page