我们从Python开源项目中,提取了以下1个代码示例,用于说明如何使用alabaster.get_path()。
def load_extra_theme(cls, name): if name in ('alabaster', 'sphinx_rtd_theme'): 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': import 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