|
1 |
| -# -*- coding: utf-8 -*- |
2 |
| -# |
3 |
| -# Configuration file for the Sphinx documentation builder. |
4 |
| -# |
5 |
| -# This file does only contain a selection of the most common options. For a |
6 |
| -# full list see the documentation: |
7 |
| -# http://www.sphinx-doc.org/en/master/config |
8 |
| - |
9 | 1 | import importlib.metadata
|
10 | 2 | import re
|
11 | 3 |
|
12 |
| -# -- Project information ----------------------------------------------------- |
13 |
| - |
14 | 4 | project = "sphinx-json-schema-spec"
|
15 | 5 | author = "Julian Berman"
|
16 | 6 | copyright = "2013, " + author
|
17 | 7 |
|
18 |
| -# version: The short X.Y version |
19 |
| -# release: The full version, including alpha/beta/rc tags. |
20 | 8 | release = importlib.metadata.version("sphinx_json_schema_spec")
|
21 | 9 | version = release.partition("-")[0]
|
22 | 10 |
|
23 |
| - |
24 |
| -# -- General configuration --------------------------------------------------- |
25 |
| - |
26 |
| -# If your documentation needs a minimal Sphinx version, state it here. |
27 |
| -# |
28 |
| -# needs_sphinx = "1.0" |
29 |
| - |
| 11 | +language = "en" |
30 | 12 | default_role = "any"
|
31 | 13 |
|
32 |
| -primary_domain = "rst" |
33 |
| - |
34 |
| -# Add any Sphinx extension module names here, as strings. They can be |
35 |
| -# extensions coming with Sphinx (named "sphinx.ext.*") or your custom |
36 |
| -# ones. |
37 | 14 | extensions = [
|
38 | 15 | "sphinx.ext.autodoc",
|
39 | 16 | "sphinx.ext.autosectionlabel",
|
|
44 | 21 | "sphinx.ext.todo",
|
45 | 22 | "sphinx_json_schema_spec",
|
46 | 23 | "sphinxcontrib.spelling",
|
| 24 | + "sphinxext.opengraph", |
47 | 25 | ]
|
48 | 26 |
|
49 |
| -# Add any paths that contain templates here, relative to this directory. |
50 |
| -templates_path = ["_templates"] |
51 |
| - |
52 |
| -# The suffix(es) of source filenames. |
53 |
| -# You can specify multiple suffix as a list of string: |
54 |
| -# |
55 |
| -# source_suffix = [".rst", ".md"] |
56 |
| -source_suffix = ".rst" |
| 27 | +pygments_style = "lovelace" |
| 28 | +pygments_dark_style = "one-dark" |
57 | 29 |
|
58 |
| -# The master toctree document. |
59 |
| -master_doc = "index" |
60 |
| - |
61 |
| -# The language for content autogenerated by Sphinx. Refer to documentation |
62 |
| -# for a list of supported languages. |
63 |
| -# |
64 |
| -# This is also used if you do content translation via gettext catalogs. |
65 |
| -# Usually you set "language" from the command line for these cases. |
66 |
| -language = "en" |
67 |
| - |
68 |
| -# List of patterns, relative to source directory, that match files and |
69 |
| -# directories to ignore when looking for source files. |
70 |
| -# This pattern also affects html_static_path and html_extra_path. |
71 |
| -exclude_patterns = [u"_build", "Thumbs.db", ".DS_Store"] |
72 |
| - |
73 |
| -# The name of the Pygments (syntax highlighting) style to use. |
74 |
| -pygments_style = "sphinx" |
75 |
| - |
76 |
| - |
77 |
| -# -- Options for HTML output ------------------------------------------------- |
78 |
| - |
79 |
| -# The theme to use for HTML and HTML Help pages. See the documentation for |
80 |
| -# a list of builtin themes. |
81 |
| -# |
82 | 30 | html_theme = "furo"
|
83 | 31 |
|
84 |
| -# Theme options are theme-specific and customize the look and feel of a theme |
85 |
| -# further. For a list of options available for each theme, see the |
86 |
| -# documentation. |
87 |
| -# |
88 |
| -# html_theme_options = {} |
89 |
| - |
90 |
| -# Add any paths that contain custom static files (such as style sheets) here, |
91 |
| -# relative to this directory. They are copied after the builtin static files, |
92 |
| -# so a file named "default.css" will overwrite the builtin "default.css". |
93 |
| -# html_static_path = ["_static"] |
94 |
| - |
95 |
| -# Custom sidebar templates, must be a dictionary that maps document names |
96 |
| -# to template names. |
97 |
| -# |
98 |
| -# The default sidebars (for documents that don't match any pattern) are |
99 |
| -# defined by theme itself. Builtin themes are using these templates by |
100 |
| -# default: ``["localtoc.html", "relations.html", "sourcelink.html", |
101 |
| -# "searchbox.html"]``. |
102 |
| -# |
103 |
| -# html_sidebars = {} |
104 |
| - |
105 |
| - |
106 |
| -# -- Options for HTMLHelp output --------------------------------------------- |
107 |
| - |
108 |
| -# Output file base name for HTML help builder. |
109 |
| -htmlhelp_basename = "sphinxjsonschemaspecdoc" |
110 |
| - |
111 |
| - |
112 |
| -# -- Options for LaTeX output ------------------------------------------------ |
113 |
| - |
114 |
| -latex_elements = { |
115 |
| - # The paper size ("letterpaper" or "a4paper"). |
116 |
| - # |
117 |
| - # "papersize": "letterpaper", |
118 |
| - |
119 |
| - # The font size ("10pt", "11pt" or "12pt"). |
120 |
| - # |
121 |
| - # "pointsize": "10pt", |
122 |
| - |
123 |
| - # Additional stuff for the LaTeX preamble. |
124 |
| - # |
125 |
| - # "preamble": "", |
126 |
| - |
127 |
| - # Latex figure (float) alignment |
128 |
| - # |
129 |
| - # "figure_align": "htbp", |
130 |
| -} |
131 |
| - |
132 |
| -# Grouping the document tree into LaTeX files. List of tuples |
133 |
| -# (source start file, target name, title, |
134 |
| -# author, documentclass [howto, manual, or own class]). |
135 |
| -latex_documents = [ |
136 |
| - ( |
137 |
| - master_doc, |
138 |
| - "Sphinx JSON Schema Spec.tex", |
139 |
| - project, |
140 |
| - author, |
141 |
| - "manual", |
142 |
| - ), |
143 |
| -] |
144 |
| - |
145 | 32 |
|
146 |
| -# -- Options for manual page output ------------------------------------------ |
147 |
| - |
148 |
| -# One entry per manual page. List of tuples |
149 |
| -# (source start file, name, description, authors, manual section). |
150 |
| -man_pages = [ |
151 |
| - ( |
152 |
| - master_doc, |
153 |
| - project, |
154 |
| - project, |
155 |
| - [author], |
156 |
| - 1, |
157 |
| - ), |
158 |
| -] |
| 33 | +def entire_domain(host): |
| 34 | + return r"http.?://" + re.escape(host) + r"($|/.*)" |
159 | 35 |
|
160 | 36 |
|
161 |
| -# -- Options for Texinfo output ---------------------------------------------- |
162 |
| - |
163 |
| -# Grouping the document tree into Texinfo files. List of tuples |
164 |
| -# (source start file, target name, title, author, |
165 |
| -# dir menu entry, description, category) |
166 |
| -texinfo_documents = [ |
167 |
| - ( |
168 |
| - master_doc, |
169 |
| - project, |
170 |
| - project, |
171 |
| - author, |
172 |
| - project, |
173 |
| - "", |
174 |
| - "Miscellaneous", |
175 |
| - ), |
| 37 | +linkcheck_ignore = [ |
| 38 | + entire_domain("img.shields.io"), |
| 39 | + "https://github.com/python-jsonschema/sphinx-json-schema-spec/actions", |
| 40 | + "https://github.com/python-jsonschema/sphinx-json-schema-spec/workflows/CI/badge.svg", # noqa: E501 |
176 | 41 | ]
|
177 | 42 |
|
| 43 | +# = Extensions = |
178 | 44 |
|
179 |
| -# -- Options for Epub output ------------------------------------------------- |
180 |
| - |
181 |
| -# Bibliographic Dublin Core info. |
182 |
| -epub_title = project |
183 |
| - |
184 |
| -# The unique identifier of the text. This can be a ISBN number |
185 |
| -# or the project homepage. |
186 |
| -# |
187 |
| -# epub_identifier = "" |
188 |
| - |
189 |
| -# A unique identification for the text. |
190 |
| -# |
191 |
| -# epub_uid = "" |
192 |
| - |
193 |
| -# A list of files that should not be packed into the epub file. |
194 |
| -epub_exclude_files = ["search.html"] |
195 |
| - |
196 |
| - |
197 |
| -# -- Extension configuration ------------------------------------------------- |
198 |
| - |
199 |
| -# -- Options for autodoc extension ------------------------------------------- |
200 |
| - |
201 |
| -autodoc_default_options = { |
202 |
| - "members": True, |
203 |
| - "member-order": "bysource", |
204 |
| -} |
205 |
| - |
206 |
| -# -- Options for autosectionlabel extension ---------------------------------- |
| 45 | +# -- autosectionlabel -- |
207 | 46 |
|
208 | 47 | autosectionlabel_prefix_document = True
|
209 | 48 |
|
210 |
| -# -- Options for intersphinx extension --------------------------------------- |
| 49 | +# -- intersphinx -- |
211 | 50 |
|
212 |
| -# Example configuration for intersphinx: refer to the Python standard library. |
213 | 51 | intersphinx_mapping = {
|
214 | 52 | "jsonschema": (
|
215 | 53 | "https://python-jsonschema.readthedocs.io/en/latest/", None,
|
|
219 | 57 | "sphinx": ("https://www.sphinx-doc.org/en/master/", None),
|
220 | 58 | }
|
221 | 59 |
|
222 |
| -# -- Options for the linkcheck builder ------------------------------------ |
223 |
| - |
| 60 | +# -- sphinxcontrib-spelling -- |
224 | 61 |
|
225 |
| -def entire_domain(host): |
226 |
| - return r"http.?://" + re.escape(host) + r"($|/.*)" |
227 |
| - |
228 |
| - |
229 |
| -linkcheck_ignore = [ |
230 |
| - entire_domain("codecov.io"), |
231 |
| - entire_domain("img.shields.io"), |
232 |
| - "https://github.com/python-jsonschema/sphinx-json-schema-spec/actions", |
233 |
| - "https://github.com/python-jsonschema/sphinx-json-schema-spec/workflows/CI/badge.svg", # noqa: E501 |
234 |
| -] |
| 62 | +spelling_word_list_filename = "spelling-wordlist.txt" |
| 63 | +spelling_show_suggestions = True |
0 commit comments