def set_theme(name): global html_theme global html_theme_path if name == 'nature': html_theme = 'nature' elif name == 'rtd': import sphinx_rtd_theme html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] elif name == 'pyramid': # TODO: broken? import pylons_sphinx_themes html_theme = 'pyramid' html_theme_path = [pylons_sphinx_themes.get_html_themes_path()] elif name == 'adc': import sphinx_adc_theme html_theme = 'sphinx_adc_theme' html_theme_path = [sphinx_adc_theme.get_html_theme_path()] # elif name == 'jupyter': # # TODO: should be on top of file? # from jupyter_sphinx_theme import * # init_theme() elif name == 'celery': import sphinx_celery html_theme = 'sphinx_celery' html_theme_path = [sphinx_celery.get_html_theme_path()] elif name == 'material': import sphinx_theme_pd html_theme = 'sphinx_theme_pd' html_theme_path = [sphinx_theme_pd.get_html_theme_path()] elif name == 'plone': extensions.append('sphinxjp.themecore') html_theme = 'plonetheme' elif name == 'mdn': import mdn_theme html_theme_path = [mdn_theme.get_theme_dir()] html_theme = 'mdn' else: raise Exception('Unknown theme {}'.format(name))
# unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # Options for HTML output # ----------------------- # Add and use Pylons theme html_theme = 'pyramid' html_theme_path = pylons_sphinx_themes.get_html_themes_path() html_theme_options = dict( canonical_url='https://pyramid-ldap3.readthedocs.io/', github_url='https://github.com/Cito/pyramid_ldap3') # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths # given in html_static_path. # html_style = 'repoze.css' # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as # html_title.
# 'http://docs.pylonsproject.org/projects/pyramid/en/latest/') # pylons_sphinx_latesturl_pagename_overrides = { # # map old pagename -> new pagename # 'whatsnew-1.0': 'index', # 'whatsnew-1.1': 'index', # 'whatsnew-1.2': 'index', # 'whatsnew-1.3': 'index', # 'whatsnew-1.4': 'index', # 'whatsnew-1.5': 'index', # 'tutorials/gae/index': 'index', # 'api/chameleon_text': 'api', # 'api/chameleon_zpt': 'api', # } html_theme = 'pyramid' html_theme_path = pylons_sphinx_themes.get_html_themes_path() html_theme_options = dict( github_url='https://github.com/Pylons/pyramid', # on master branch true, else false in_progress='true', # on previous branches/major releases true, else false outdated='false', ) # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". html_title = 'The Pyramid Web Framework v%s' % release # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. html_last_updated_fmt = '%b %d, %Y'