Debian Codegraph @

jupyter_sphinx_theme/__init__.py

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 """Jupyter sphinx theme."""
2 import os
3 import subprocess
4 import sys
5
6 on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
7
8 def get_html_theme_path():
9 """Return list of HTML theme paths."""
10 cur_dir = os.path.abspath(os.path.dirname(__file__))
11 return [cur_dir]
12
13 def bash(fileName):
14 """Runs a bash script in the local directory"""
15 sys.stdout.flush()
16 subprocess.call("bash {}".format(fileName), shell=True)
17
18 VERSION = (0, 0, 6)
19 __version__ = ".".join(str(v) for v in VERSION)
20 __version_full__ = __version__
21 theme_version = __version__
22
23 # The suffix(es) of source filenames.
24 # You can specify multiple suffix as a list of string:
25 source_suffix = ['.rst', '.ipynb']
26
27 # Conf.py import settings
28 source_parsers = {}
29 def init_theme():
30 from recommonmark.parser import CommonMarkParser
31 source_parsers['.md'] = CommonMarkParser
32 source_suffix.append('.md')
33
34 html_theme = 'jupyter'
35 html_theme_path = get_html_theme_path()
36
37 extensions = [
38 'sphinx.ext.autodoc',
39 'sphinx.ext.intersphinx',
40 'sphinx.ext.mathjax',
41 'nbsphinx'
42 ]
43
44 html_sidebars = {
45 '**': [
46 'sidebartoc.html'
47 ]
48 }