-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
conf.py
177 lines (148 loc) · 4.01 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
#
"""conf - Sphinx configuration information."""
import os
import sys
from contextlib import suppress
from subprocess import CalledProcessError, PIPE, run
import ablog
import alabaster
sys.path.extend([os.path.curdir, os.path.pardir])
# General configuration {{{
extensions = (
[
'sphinx.ext.%s' % ext
for ext in [
'duration',
'extlinks',
'githubpages',
'intersphinx',
]
]
+ ['sphinxcontrib.%s' % ext for ext in ['spelling']]
+ [
'ext.%s' % ext
for ext in [
'jinja',
]
]
+ ['ablog', 'alabaster']
)
# Only activate spelling if it is installed. It is not required in the
# general case and we don’t have the granularity to describe this in a clean
# way
try:
from sphinxcontrib import spelling # NOQA: F401
except ImportError:
pass
else:
extensions.append('sphinxcontrib.spelling')
exclude_patterns = ['README.rst', '.build', 'draft']
templates_path = ['.templates', ablog.get_html_templates_path()]
rst_epilog = """
.. |CLA| replace:: :abbr:`CLA (Contributor License Agreement)`
.. |DAG| replace:: :abbr:`DAG (Directed Acyclic Graph)`
.. |DVCS| replace:: :abbr:`DVCS (Distributed Version Control System)`
.. |HTML| replace:: :abbr:`HTML (HyperText Markup Language)`
.. |IRC| replace:: :abbr:`IRC (Internet Relay Chat)`
.. |ISO| replace:: :abbr:`ISO (International Organization for Standardization)`
.. |PyPI| replace:: :abbr:`PyPI (Python Package Index)`
.. |REPL| replace:: :abbr:`REPL (Read–Eval–Print Loop)`
.. |RegEx| replace:: :abbr:`RegEx (Regular Expression)`
.. |URL| replace:: :abbr:`URL (Uniform Resource Locator)`
.. |VCS| replace:: :abbr:`VCS (Version Control System)`
.. |XML| replace:: :abbr:`XML (Extensible Markup Language)`
"""
default_role = 'any'
needs_sphinx = '3.5'
nitpicky = True
# }}}
# Project information {{{
project = 'JNRowe'
author = 'James Rowe'
copyright = f'2009-2021 {author}'
version = '0.1'
release = '0.1.0'
pygments_style = 'monokai'
trim_footnote_reference_space = True
# }}}
# Options for HTML output {{{
html_theme = 'alabaster'
html_theme_options = {
'pre_bg': '#272822',
'font_family': '"Verdana", "Arial", sans-serif',
'head_font_family': '"Times", "Calibri", serif',
'logo': 'logo.png',
'show_related': True,
}
html_theme_path = [
alabaster.get_path(),
]
html_css_files = [
'custom.css',
]
html_title = 'JNRowe'
html_baseurl = 'https://jnrowe.github.io/'
html_context = {'feed_link': True}
html_favicon = '.static/icon.ico'
html_static_path = [
'.static',
]
html_extra_path = [
'.extras',
]
with suppress(CalledProcessError):
proc = run(
['git', 'log', "--pretty=format:%ad [%h]", '--date=short', '-n1'],
stdout=PIPE,
)
html_last_updated_fmt = proc.stdout.decode()
html_copy_source = False
# }}}
# extlinks extension settings {{{
extlinks = {
'gist': ('http://gist.github.com/%s', 'gist #%s'),
'pypi': ('https://pypi.python.org/pypi/%s', '%s'),
'µnote': ('https://jnrowe.github.io/mnotes/#%s', '%s'),
}
# }}}
# ablog extension settings {{{
blog_title = project
blog_baseurl = html_baseurl
blog_authors = {
'JNRowe': (author, html_baseurl),
}
blog_default_author = 'JNRowe'
post_date_format = '%F'
post_redirect_refresh = 1
html_sidebars = {
'**': [
'about.html',
'postcard.html',
'navigation.html',
'recentposts.html',
'tagcloud.html',
'categories.html',
'archives.html',
'searchbox.html',
],
}
blog_feed_archives = True
blog_feed_fulltext = True
blog_feed_subtitle = 'Ramblings of a tired mind'
blog_feed_length = 15
# }}}
# intersphinx extension settings {{{
intersphinx_mapping = {
'python': (
'https://docs.python.org/3/',
os.getenv('SPHINX_PYTHON_OBJECTS'),
),
}
# }}}
# spelling extension settings {{{
spelling_ignore_acronyms = False
spelling_ignore_importable_modules = False
spelling_ignore_python_builtins = False
spelling_lang = 'en_GB'
spelling_word_list_filename = 'wordlist.txt'
# }}}