Skip to content

Instantly share code, notes, and snippets.

@shirou
Last active November 22, 2016 03:36
Show Gist options
  • Save shirou/6577620 to your computer and use it in GitHub Desktop.
Save shirou/6577620 to your computer and use it in GitHub Desktop.
add these lines to conf.py
How to write
1. pip install sphinxjp.themecore
2. pip install <なにか新しいtinkererのテーマ> 例: sphinxjp.themes.newtinker
3. 'sphinxjp.themecore' をextentionsに追加する
例: extensions = ['tinkerer.ext.blog', 'tinkerer.ext.disqus', 'sphinxjp.themecore']
4. html_theme = "<なにか新しいtinkererのテーマ>" と書く
5. ヽ(゚∀゚ヽ 三 ノ゚∀゚)ノ ワーイ
## これは使わなくてもいいことが分かりました
import pkg_resources
def get_theme_directory_path():
theme_paths = []
for plugin in pkg_resources.iter_entry_points('sphinx_themes'):
m = plugin.load()
if callable(m):
path = m()
else:
path = m
theme_paths.append(path)
return theme_paths
# Add other theme paths here
html_theme_path = [tinkerer.paths.themes] + get_theme_directory_path()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment