-
Notifications
You must be signed in to change notification settings - Fork 1
/
conf.py
58 lines (46 loc) · 1.24 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env python3
# enable MathJax
extensions = [
'sphinx.ext.mathjax'
]
# specify template path
templates_path = ['_templates']
# specify static path
html_static_path = ['content/static']
master_doc = 'content/en/index'
html_logo = 'content/static/logo.png'
html_favicon = 'content/static/favicon.ico'
html_show_copyright = False
html_context = {
'display_github': True,
'github_user': 'approach0',
'github_repo': 'guide',
'github_version': 'master/',
}
# import markdown parser
from recommonmark.parser import CommonMarkParser
from recommonmark.transform import AutoStructify
source_parsers = {
'.md': CommonMarkParser,
}
source_suffix = ['.md', '.rst']
templates_path = ['README.md'] # exclude file
exclude_patterns = ['_build', 'node_modules']
def setup(app):
app.add_transform(AutoStructify)
def convert_npm_name(name):
return name.upper().replace('_', ' ')
# project info
import json
fh = open('./package.json')
manifest = json.load(fh)
project = convert_npm_name(manifest['name'])
html_title = convert_npm_name(manifest['name'])
copyright = manifest['author']
author = manifest['author']
version = ''
release = ''
fh.close()
pygments_style = 'sphinx'
html_theme = 'sphinx_rtd_theme'
html_theme_path = ["_themes"]