Skip to content

Commit 96a04d9

Browse files
committed
build(docs): Update config to latest and greatest
1 parent a681b6a commit 96a04d9

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

docs/conf.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from os.path import dirname, relpath
66

77
import alagitpull
8+
from recommonmark.transform import AutoStructify
89

910
import libtmux # NOQA
1011
from libtmux import test # NOQA
@@ -30,13 +31,30 @@
3031
'sphinx.ext.napoleon',
3132
'alagitpull',
3233
'sphinx_issues',
34+
'recommonmark',
3335
]
3436

37+
# app setup hook
38+
def setup(app):
39+
app.add_config_value(
40+
'recommonmark_config',
41+
{
42+
#'url_resolver': lambda url: github_doc_root + url,
43+
'enable_auto_toc_tree': True,
44+
'auto_toc_tree_section': 'Contents',
45+
'auto_code_block': True,
46+
'enable_eval_rst': True,
47+
},
48+
True,
49+
)
50+
app.add_transform(AutoStructify)
51+
52+
3553
issues_github_path = about['__github__'].replace('https://github.com/', '')
3654

3755
templates_path = ['_templates']
3856

39-
source_suffix = '.rst'
57+
source_suffix = {'.rst': 'restructuredtext', '.md': 'markdown'}
4058

4159
master_doc = 'index'
4260

@@ -61,6 +79,12 @@
6179
'github_banner': True,
6280
'projects': alagitpull.projects,
6381
'project_name': about['__title__'],
82+
'project_title': about['__title__'],
83+
'project_description': about['__description__'],
84+
'project_url': about['__docs__'],
85+
'show_meta_manifest_tag': True,
86+
'show_meta_og_tags': True,
87+
'show_meta_app_icon_tags': True,
6488
}
6589
alagitpull_internal_hosts = ['libtmux.git-pull.com', '0.0.0.0']
6690
alagitpull_external_hosts_new_window = True
@@ -78,6 +102,7 @@
78102

79103
html_theme_path = ['_themes']
80104
html_static_path = ['_static']
105+
html_extra_path = ['manifest.json']
81106

82107
htmlhelp_basename = '%sdoc' % about['__title__']
83108

0 commit comments

Comments
 (0)