-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconf.py
More file actions
133 lines (100 loc) · 3.44 KB
/
Copy pathconf.py
File metadata and controls
133 lines (100 loc) · 3.44 KB
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
# -- Path setup for local extensions -----------------------------------------
import sys, os
sys.path.insert(0, os.path.abspath('_ext'))
# -- Custom roles ------------------------------------------------------------
from docutils.parsers.rst import roles
from docutils import nodes
def module_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
"""Custom role for Apache module names: :module:`mod_rewrite`"""
node = nodes.literal(rawtext, text, classes=['module'])
return [node], []
roles.register_local_role('module', module_role)
# mod_rewrite And Friends
# by Rich Bowen
# -- Project information -----------------------------------------------------
project = 'mod_rewrite And Friends'
copyright = '2013–2026, Rich Bowen. Licensed under the Apache License, Version 2.0'
author = 'Rich Bowen'
# The full version, including alpha/beta/rc tags
release = '3.9.0'
version = '3.9'
# -- General configuration ---------------------------------------------------
extensions = [
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'version_badge',
]
# The master toctree document
master_doc = 'index'
# List of patterns to exclude from source
exclude_patterns = [
'_build',
'Thumbs.db',
'.DS_Store',
'README.md',
'CHANGES.rst',
'TODO.md',
]
# The suffix of source filenames
source_suffix = '.rst'
# -- Options for HTML output -------------------------------------------------
html_theme = 'alabaster'
html_theme_options = {
'description': 'A Guide to URL Manipulation and Mapping with the Apache HTTP Server',
'github_user': 'rbowen',
'github_repo': 'mod_rewrite_book',
'fixed_sidebar': True,
'sidebar_width': '260px',
}
html_static_path = ['_static']
# -- Options for LaTeX/PDF output --------------------------------------------
latex_documents = [
(master_doc, 'mod_rewrite_and_friends.tex',
'mod\\_rewrite And Friends',
'Rich Bowen', 'manual'),
]
# -- KDP print-ready vs standard PDF -----------------------------------------
# Set KDP_PRINT=1 environment variable to build 6x9 trade paperback PDF.
# Default (unset) builds standard letter-size PDF for web/screen use.
_kdp_print = os.environ.get('KDP_PRINT', '') == '1'
if _kdp_print:
latex_elements = {
'papersize': '', # handled by geometry package
'pointsize': '11pt',
'preamble': r'''
\geometry{paperwidth=6in, paperheight=9in,
inner=0.75in, outer=0.625in,
top=0.75in, bottom=0.85in}
\setlength{\headheight}{14pt}
\usepackage{makeidx}
\makeindex
''',
'fncychap': r'\usepackage[Bjarne]{fncychap}',
'extraclassoptions': 'openany',
}
else:
latex_elements = {
'papersize': 'letterpaper',
'pointsize': '11pt',
'preamble': r'''
\setlength{\headheight}{14pt}
\usepackage{makeidx}
\makeindex
''',
}
# -- Options for EPUB output -------------------------------------------------
epub_title = project
epub_author = author
epub_publisher = author
epub_copyright = copyright
epub_show_urls = 'footnote'
epub_use_index = True
# -- Options for todo extension ----------------------------------------------
# Set to True during development to see todo items in the rendered output
todo_include_todos = False
# -- Intersphinx configuration -----------------------------------------------
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
}
# -- Numbered figures and tables ---------------------------------------------
numfig = False