• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python sphinx_rtd_theme.get_html_theme_path函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中sphinx_rtd_theme.get_html_theme_path函数的典型用法代码示例。如果您正苦于以下问题:Python get_html_theme_path函数的具体用法?Python get_html_theme_path怎么用?Python get_html_theme_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_html_theme_path函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: load_extra_theme

    def load_extra_theme(cls, name):
        themes = ['alabaster']
        try:
            import sphinx_rtd_theme
            themes.append('sphinx_rtd_theme')
        except ImportError:
            pass
        if name in themes:
            if name == 'alabaster':
                import alabaster
                themedir = alabaster.get_path()
                # alabaster theme also requires 'alabaster' extension, it will be loaded
                # at sphinx.application module.
            elif name == 'sphinx_rtd_theme':
                themedir = sphinx_rtd_theme.get_html_theme_path()
            else:
                raise NotImplementedError('Programming Error')

        else:
            for themedir in load_theme_plugins():
                if path.isfile(path.join(themedir, name, THEMECONF)):
                    break
            else:
                # specified theme is not found
                return

        cls.themepath.append(themedir)
        cls.themes[name] = (path.join(themedir, name), None)
        return
开发者ID:AlexEshoo,项目名称:sphinx,代码行数:29,代码来源:theming.py


示例2: load_sphinx_rtd_theme

 def load_sphinx_rtd_theme(self):
     # type: () -> None
     """Load sphinx_rtd_theme theme (if exists)."""
     try:
         import sphinx_rtd_theme
         theme_path = sphinx_rtd_theme.get_html_theme_path()
         self.themes['sphinx_rtd_theme'] = path.join(theme_path, 'sphinx_rtd_theme')
     except ImportError:
         pass
开发者ID:willingc,项目名称:sphinx,代码行数:9,代码来源:theming.py


示例3: set_sphinx_html_path

def set_sphinx_html_path(project):
    import sphinx_rtd_theme

    sphinx_conf = project.get_property("sphinx_project_conf")
    sphinx_conf["html_theme"] = "sphinx_rtd_theme"
    sphinx_conf["html_theme_path"] = [sphinx_rtd_theme.get_html_theme_path()]

    # Napoleon settings
    sphinx_conf["extensions"].append("sphinx.ext.napoleon")
    sphinx_conf["napoleon_google_docstring"] = True
    sphinx_conf["napoleon_numpy_docstring"] = False
    sphinx_conf["napoleon_include_init_with_doc"] = False
    sphinx_conf["napoleon_include_private_with_doc"] = False
    sphinx_conf["napoleon_include_special_with_doc"] = False
    sphinx_conf["napoleon_use_admonition_for_examples"] = False
    sphinx_conf["napoleon_use_admonition_for_notes"] = False
    sphinx_conf["napoleon_use_admonition_for_references"] = False
    sphinx_conf["napoleon_use_ivar"] = False
    sphinx_conf["napoleon_use_param"] = True
    sphinx_conf["napoleon_use_rtype"] = True
    sphinx_conf["napoleon_use_keyword"] = True
开发者ID:arcivanov,项目名称:karellen-pyb-plugin,代码行数:21,代码来源:__init__.py


示例4: load_extra_theme

    def load_extra_theme(cls, name):
        if name == 'alabaster':
            cls.themes[name] = (os.path.join(alabaster.get_path(), name), None)
            # alabaster theme also requires 'alabaster' extension, it will be loaded at
            # sphinx.******* module.
            return

        if name == 'sphinx_rtd_theme':
            cls.themes[name] = (
                os.path.join(sphinx_rtd_theme.get_html_theme_path(), name), None)
            return

        for themedir in load_theme_plugins():
            if not path.isdir(themedir):
                continue
            for theme in os.listdir(themedir):
                if theme != name:
                    continue
                if not path.isfile(path.join(themedir, theme, THEMECONF)):
                    continue
                cls.themes[theme] = (path.join(themedir, theme), None)
                return
开发者ID:861008761,项目名称:standard_flask_web,代码行数:22,代码来源:theming.py


示例5: set_theme

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))
开发者ID:BCCVL,项目名称:docs,代码行数:39,代码来源:conf.py


示例6: load_extra_theme

    def load_extra_theme(cls, name):
        if name in ("alabaster", "sphinx_rtd_theme"):
            if name == "alabaster":
                themedir = alabaster.get_path()
                # alabaster theme also requires 'alabaster' extension, it will be loaded
                # at sphinx.application module.
            elif name == "sphinx_rtd_theme":
                themedir = sphinx_rtd_theme.get_html_theme_path()
            else:
                raise NotImplementedError("Programming Error")

        else:
            for themedir in load_theme_plugins():
                if path.isfile(path.join(themedir, name, THEMECONF)):
                    break
            else:
                # specified theme is not found
                return

        cls.themepath.append(themedir)
        cls.themes[name] = (path.join(themedir, name), None)
        return
开发者ID:gaofan1234,项目名称:Django,代码行数:22,代码来源:theming.py


示例7: execfile

# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os

try:
    import sphinx_rtd_theme
    HTML_THEME = "sphinx_rtd_theme"
    HTML_THEME_PATH = [sphinx_rtd_theme.get_html_theme_path()]
except ImportError:
    HTML_THEME = 'default'
    HTML_THEME_PATH = []


# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
开发者ID:linkdd,项目名称:phase-currentcost,代码行数:30,代码来源:conf.py


示例8: file

modindex_common_prefix = []


# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
html_theme = 'default' if on_rtd else 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [] if on_rtd else [sphinx_rtd_theme.get_html_theme_path()]

# The name for this set of Sphinx documents.  If None, it defaults to
# "<project> v<release> documentation".
html_title = 'rebase-helper {0} documentation'.format(VERSION)

# A shorter title for the navigation bar.  Default is the same as html_title.
html_short_title = html_title

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = None

# The name of an image file (within the static path) to use as favicon of the
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
开发者ID:rebase-helper,项目名称:rebase-helper,代码行数:31,代码来源:conf.py


示例9: open

"""
    Options for sphinx
    Add project specific options to conf.py in the root folder
"""
import sphinx_rtd_theme
import os

this_dir = os.path.abspath(os.path.dirname(__file__))
support_dir = os.path.join(this_dir, "..", "support")

extensions = ['sphinx.ext.autodoc']

html_theme = 'the_theme'
html_theme_path = [os.path.join(support_dir, 'templates'), sphinx_rtd_theme.get_html_theme_path()]
html_static_path = [os.path.join(support_dir, "static"), os.path.join(sphinx_rtd_theme.get_html_theme_path(), "sphinx_rtd_theme", "static")]

exclude_patterns = []

master_doc = 'index'
source_suffix = '.rst'

pygments_style = 'pastie'

# Add options specific to this project
location = os.path.join(this_dir, '../conf.py')
with open(location) as f:
    code = compile(f.read(), location, 'exec')
    exec(code, globals(), locals())
开发者ID:delfick,项目名称:delfick_app,代码行数:28,代码来源:conf.py


示例10:

extensions = ['sphinxcontrib.phpdomain']
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
project = u'php-opencloud'
copyright = u'2015, Jamie Hannaford, Shaunak Kashyap'
version = '1.12'
release = '1.12.1'
exclude_patterns = ['_build']
pygments_style = 'sphinx'
html_theme = 'default'

if not on_rtd:
    import sphinx_rtd_theme
    html_theme = 'sphinx_rtd_theme'
    html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "_templates"]

html_static_path = ['_static']
html_use_index = True

# Output file base name for HTML help builder.
htmlhelp_basename = 'php-openclouddoc'

latex_documents = [
  ('index', 'php-opencloud.tex', u'php-opencloud Documentation',
   u'Jamie Hannaford, Shaunak Kashyap', 'manual'),
]

man_pages = [
    ('index', 'php-opencloud', u'php-opencloud Documentation',
     [u'Jamie Hannaford, Shaunak Kashyap'], 1)
开发者ID:AdamMerrifield,项目名称:php-opencloud,代码行数:31,代码来源:conf.py


示例11: file

highlight_language = "julia"


# -- Options for HTML output ---------------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
html_theme = "julia"

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
# html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [juliadoc.get_theme_dir(), sphinx_rtd_theme.get_html_theme_path()]

# 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.
# html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = None

# The name of an image file (within the static path) to use as favicon of the
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
开发者ID:jacg,项目名称:julia,代码行数:31,代码来源:conf.py


示例12:

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []


# -- Options for HTML output ---------------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
# html_theme = 'default'

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if not on_rtd:  # only import and set the theme if we're building docs locally
    import sphinx_rtd_theme
    html_theme = 'sphinx_rtd_theme'
    html_theme_path = ["_themes", sphinx_rtd_theme.get_html_theme_path()]

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []

# 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.
#html_short_title = None
开发者ID:mbartosch,项目名称:openxpki,代码行数:31,代码来源:conf.py


示例13: navbar

napoleon_use_admonition_for_references = False
napoleon_use_ivar = False
napoleon_use_param = True
napoleon_use_rtype = True

# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd:  # only import and set the theme if we're building docs locally
    import sphinx_rtd_theme
    html_theme = 'sphinx_rtd_theme'
    # Add any paths that contain custom themes here, relative to this
    # directory.
    html_theme_path = ['_themes'] + [sphinx_rtd_theme.get_html_theme_path()]

# (Optional) Logo. Should be small enough to fit the navbar (ideally 24x24).
# Path should be relative to the ``_static`` files directory.
html_logo = "phi.png"

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
# html_theme_options = {}

html_sidebars = {'**': ['localtoc.html']}

# The name for this set of Sphinx documents.  If None, it defaults to
# "<project> v<release> documentation".
html_title = version + " documentation"
开发者ID:roijo,项目名称:pyphi,代码行数:31,代码来源:conf.py


示例14: files

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
html_theme_path = ['_themes']

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
import sphinx_rtd_theme
html_static_path = [join(sphinx_rtd_theme.get_html_theme_path(), 'sphinx_rtd_theme', 'static')]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself.  Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}


# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
开发者ID:InfiniteStyles,项目名称:pm-js,代码行数:31,代码来源:conf.py


示例15: file

# The Theme MUST BE AN OPEN SOURCE SPHINX THEME. Contributors outside of
# Adfinis SyGroup AG must be able to build the documentation.
# Developers of Adfinis SyGroup AG can build the documentation using
#   make html_adsy
#      .. or ..
#   make SPHINXOPTS="-D html_theme='adsy'" html 
html_theme = 'adsy'

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [ 'adsy-sphinx-template.src/html', sphinx_rtd_theme.get_html_theme_path()]
# 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.
#html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None

# The name of an image file (relative to this directory) to use as a favicon of
# the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
开发者ID:adfinis-sygroup,项目名称:virtesk,代码行数:30,代码来源:conf.py


示例16:

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []

# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False


# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
# html_theme = 'default'
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
print "Loading RTD Theme from {}".format(sphinx_rtd_theme.get_html_theme_path())


# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []

# The name for this set of Sphinx documents.  If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
开发者ID:11i4,项目名称:OffenesParlament,代码行数:29,代码来源:conf.py


示例17:

pygments_style = 'sphinx'

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []

# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False


# -- Options for HTML output ----------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
import sphinx_rtd_theme as rtd
html_theme = "sphinx_rtd_theme"
html_theme_path = [rtd.get_html_theme_path()]

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []

# 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.
#html_short_title = None
开发者ID:Qucs,项目名称:qucs-manual,代码行数:31,代码来源:conf.py


示例18: files

intersphinx_mapping = { #
        'pyglet': ('http://pyglet.readthedocs.io/en/latest', None),
}

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False

## Options for HTML output

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.

from sphinx_rtd_theme import get_html_theme_path
html_theme = "sphinx_rtd_theme"
html_theme_path = [get_html_theme_path()]

html_favicon = 'favicon.ico'

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['.static']

## Options for HTMLHelp output
开发者ID:kxgames,项目名称:glooey,代码行数:30,代码来源:conf.py


示例19: file

#modindex_common_prefix = []


# -- Options for HTML output ---------------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
html_theme = "sphinx_rtd_theme" if use_rtd_theme else 'default'

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [sphinx_rtd_theme.get_html_theme_path() if use_rtd_theme else '_theme']

# 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.
#html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None

# The name of an image file (within the static path) to use as favicon of the
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
开发者ID:mapix,项目名称:Maruko,代码行数:31,代码来源:conf.py


示例20: file


# -- Options for HTML output --------------------------------------------------

# The theme to use for HTML and HTML Help pages.  Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = "sphinx_rtd_theme"

# Theme options are theme-specific and customize the look and feel of a theme
# further.  For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
import sphinx_rtd_theme
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(),os.path.abspath('./_themes')]

# 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.
#html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None

# The name of an image file (within the static path) to use as favicon of the
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
开发者ID:Voronenko,项目名称:projectdocs,代码行数:29,代码来源:conf.py



注:本文中的sphinx_rtd_theme.get_html_theme_path函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python parser.parse_parser函数代码示例发布时间:2022-05-27
下一篇:
Python sphinx_bootstrap_theme.get_html_theme_path函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap