forked from Nuitka/Nuitka-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshared_conf.py
143 lines (120 loc) · 3.35 KB
/
shared_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
import sys
import time
from pathlib import Path
# Configuration file for the Sphinx documentation builder.
# -- Project information
project = "Nuitka the Python Compiler"
copyright = f"{time.gmtime().tm_year}, Kay Hayen and Nuitka Contributors"
author = "Kay Hayen"
release = version = ""
ROOT = Path(__file__).parent.absolute().as_posix() # The root directory
# For autodoc to work
sys.path.append(ROOT)
from update import importNuitka # isort:skip
importNuitka()
del sys.path[-1]
# -- General configuration
extensions = [
# Sphinx's own extensions
"sphinx.ext.autodoc",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.todo",
# "sphinx.ext.viewcode",
# External extensions
"sphinx_copybutton",
"sphinx_design",
# "sphinx_inline_tabs",
"sphinxcontrib.youtube",
"sphinx_favicon",
"sphinx_sitemap",
# Disabled, loads to slow and cannot be limited to needing pages.
# "sphinxcontrib.asciinema",
# Blog extension
"ablog",
]
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
}
intersphinx_disabled_domains = ["std"]
templates_path = [f"{ROOT}/_templates"]
# Options for ABlog
# The "title" for the blog, used in active pages. Default is ``'Blog'``.
blog_title = "Nuitka Blog"
# Base URL for the website, required for generating feeds.
# e.g. blog_baseurl = "http://example.com/"
blog_baseurl = "https://nuitka.net"
blog_path = "blog"
blog_feed_fulltext = True
blog_feed_archives = True
blog_feed_length = None
# -- Options for HTML output
html_theme = "sphinx_rtd_theme"
html_logo = f"{ROOT}/doc/Nuitka-Logo-Symbol.svg"
html_copy_source = False
html_show_sourcelink = False
html_show_sphinx = False
favicons = [
{
"rel": "icon",
"static-file": "favicon.svg",
"type": "image/svg+xml",
},
{
"rel": "icon",
"sizes": "32x32",
"static-file": "favicon.png",
},
{
"rel": "icon",
"sizes": "32x32",
"static-file": "favicon.ico",
},
{
"rel": "icon",
"sizes": "57x57",
"static-file": "apple-touch-icon-iphone.png",
},
{
"rel": "icon",
"sizes": "72x72",
"static-file": "apple-touch-icon-ipad.png",
},
{
"rel": "icon",
"sizes": "114x114",
"static-file": "apple-touch-icon-iphone4.png",
},
{
"rel": "icon",
"sizes": "144x144",
"static-file": "apple-touch-icon-ipad3.png",
},
{
"rel": "apple-touch-icon",
"sizes": "180x180",
"static-file": "apple-touch-icon-180x180.png",
},
]
# -- Options for EPUB output
epub_show_urls = "footnote"
# Enable our own CSS to be used.
def setup(app):
app.add_css_file("my_theme.css")
# Configure theme
html_theme_options = {
"prev_next_buttons_location": "none",
"includehidden": True,
}
html_extra_path = [f"{ROOT}/files"]
# TODO: Make it configurable from the outside, for branch builds
html_baseurl = 'https://nuitka.net'
sitemap_locales = [None]
sitemap_url_scheme = "{lang}/{link}"
# TODO: Not sure if I really like that, we should use relative URLs on the inside,
# so this ought to be wrong anyway.
extlinks = {'nuitka': ('/%s', None)}
html_static_path = [f"{ROOT}/_static"]
gettext_compact = False # optional.