File: __init__.py

package info (click to toggle)
sphinx-bootstrap-theme 0.8.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,988 kB
  • sloc: javascript: 8,488; makefile: 134; python: 69
file content (18 lines) | stat: -rw-r--r-- 461 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""Sphinx bootstrap theme."""
import os

__version__ = "0.8.1"


def get_html_theme_path():
    """Return list of HTML theme paths."""
    theme_path = os.path.abspath(os.path.dirname(__file__))
    return [theme_path]


def setup(app):
    """Setup."""
    # add_html_theme is new in Sphinx 1.6+
    if hasattr(app, 'add_html_theme'):
        theme_path = get_html_theme_path()[0]
        app.add_html_theme('bootstrap', os.path.join(theme_path, 'bootstrap'))