Last active
November 22, 2016 03:36
-
-
Save shirou/6577620 to your computer and use it in GitHub Desktop.
add these lines to conf.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. ヽ(゚∀゚ヽ 三 ノ゚∀゚)ノ ワーイ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## これは使わなくてもいいことが分かりました | |
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