This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
forked from PonomaryovVladyslav/PythonCourses
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconf.py
80 lines (68 loc) · 1.98 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
# Sphinx documentation generator configuration
import sys
from datetime import datetime
from pathlib import Path
import toml
# set up paths
BASE_DIR = Path(__file__).resolve().parent.parent
sys.path.insert(0, str(BASE_DIR / "problem-sets" / "src"))
# read project data from toml file
with open(BASE_DIR / "pyproject.toml") as io_buff:
project_data = toml.load(io_buff)["tool"]["poetry"]
# project information
project = "Python Training Course"
project_copyright = \
f"{datetime.now().year}, Python training course authors and contributors"
authors = " \\and ".join(project_data["authors"])
version = project_data["version"]
# general configuration
master_doc = root_doc = "index"
extensions = [
"sphinx.ext.autodoc",
"sphinxcontrib.inkscapeconverter",
"sphinxcontrib.bibtex",
"sphinxcontrib.mermaid",
"sphinx_rtd_theme",
"myst_parser",
"sphinx_copybutton",
"sphinx_reredirects",
]
source_suffix = {
".txt": "restructuredtext",
".rst": "restructuredtext",
".md": "markdown",
}
needs_sphinx = "4.0"
exclude_patterns = [
"**/_legacy/**",
"**/legacy/**",
"**/README.*",
]
suppress_warnings = []
# options for bibliography
bibtex_bibfiles = ["refs.bib"]
bibtex_reference_style = "label"
# options for redirects
redirects = {
"appx/blog/spec": "../../spec/blog/index.html",
"appx/blog/index": "../../spec/blog/index.html",
"appx/libms/spec": "../../spec/libms/index.html",
"appx/libms/index": "../../spec/libms/index.html",
}
# options for internationalization
gettext_compact = False
language = "en"
locale_dirs = ["_locales"]
# options for HTML output
html_theme = "sphinx_rtd_theme"
html_favicon = str(BASE_DIR / "assets" / "favicon.ico")
# options for LaTeX output
latex_doc = project.title().replace(" ", "") + ".tex"
latex_engine = "xelatex"
latex_documents = [
(master_doc, latex_doc, project, authors, "manual", False),
# TODO: add separate documents to build
]
latex_appendices = [
# TODO: review appendices list
]