1# Configuration file for the Sphinx documentation builder.
2#
3# This file only contains a selection of the most common options. For a full
4# list see the documentation:
5# http://www.sphinx-doc.org/en/master/config
6# -- Path setup --------------------------------------------------------------
7# If extensions (or modules to document with autodoc) are in another directory,
8# add these directories to sys.path here. If the directory is relative to the
9# documentation root, use os.path.abspath to make it absolute, like shown here.
10#
11# import os
12# import sys
13# sys.path.insert(0, os.path.abspath('.'))
14import platform
15from datetime import datetime
16from zoneinfo import ZoneInfo
17
18import sphinx
19import sphinx_material
20
21# If extensions (or modules to document with autodoc) are in another directory,
22# add these directories to sys.path here. If the directory is relative to the
23# documentation root, use os.path.abspath to make it absolute, like shown here.
24# sys.path.insert(0, os.path.abspath("./src"))
25
26
27project = "Tuto HTML"
28html_title = project
29
30author = f"DevOps people"
31html_logo = "images/html_living.png"
32html_favicon = "images/html_living.png"
33release = "0.1.0"
34now = datetime.now(tz=ZoneInfo("Europe/Paris"))
35version = f"{now.year}-{now.month:02}-{now.day:02} {now.hour:02}H ({now.tzinfo})"
36today = version
37
38extensions = [
39 "sphinx.ext.autodoc",
40 "sphinx.ext.doctest",
41 "sphinx.ext.extlinks",
42 "sphinx.ext.intersphinx",
43 "sphinx.ext.todo",
44 "sphinx.ext.mathjax",
45 "sphinx.ext.viewcode",
46 "sphinx_copybutton",
47]
48
49# Add any paths that contain templates here, relative to this directory.
50templates_path = ["_templates"]
51exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
52html_static_path = ["_static"]
53html_show_sourcelink = True
54html_sidebars = {
55 "**": ["logo-text.html", "globaltoc.html", "localtoc.html", "searchbox.html"]
56}
57extensions.append("sphinx_material")
58html_theme_path = sphinx_material.html_theme_path()
59html_context = sphinx_material.get_html_context()
60html_theme = "sphinx_material"
61
62extensions.append("sphinx.ext.intersphinx")
63intersphinx_mapping = {
64 "docker": ("https://gdevops.gitlab.io/tuto_docker/", None),
65 "tuto_javascript": ("https://gdevops.gitlab.io/tuto_javascript/", None),
66 "django": ("https://gdevops.gitlab.io/tuto_django/", None),
67 "documentation": ("https://gdevops.gitlab.io/tuto_documentation/", None),
68 "http": ("https://gdevops.gitlab.io/tuto_http/", None),
69 "webframeworks": ("https://gdevops.gitlab.io/tuto_webframeworks/", None),
70 "project": ("https://gdevops.gitlab.io/tuto_project/", None),
71 "webframeworks": ("https://gdevops.gitlab.io/tuto_webframeworks/", None),
72 "conda": ("https://conda.io/en/latest/", None),
73 "sphinx": ("https://www.sphinx-doc.org/en/master", None),
74 "sphinx_material": ("https://gdevops.gitlab.io/tuto_sphinx_material", None),
75}
76extensions.append("sphinx.ext.todo")
77todo_include_todos = True
78
79
80# material theme options (see theme.conf for more information)
81# https://gitlab.com/bashtage/sphinx-material/blob/master/sphinx_material/sphinx_material/theme.conf
82# Colors
83# The theme color for mobile browsers. Hex color.
84# theme_color = #3f51b5
85# Primary colors:
86# red, pink, purple, deep-purple, indigo, blue, light-blue, cyan,
87# teal, green, light-green, lime, yellow, amber, orange, deep-orange,
88# brown, grey, blue-grey, white
89# Accent colors:
90# red, pink, purple, deep-purple, indigo, blue, light-blue, cyan,
91# teal, green, light-green, lime, yellow, amber, orange, deep-orange
92# color_accent = blue
93# color_primary = blue-grey
94
95# material theme options (see theme.conf for more information)
96html_theme_options = {
97 "base_url": "https://gdevops.gitlab.io/tuto_html/",
98 "repo_url": "https://gitlab.com/gdevops/tuto_html",
99 "repo_name": project,
100 "html_minify": False,
101 "html_prettify": True,
102 "css_minify": True,
103 "repo_type": "gitlab",
104 "globaltoc_depth": -1,
105 "color_primary": "green",
106 "color_accent": "cyan",
107 "theme_color": "#2196f3",
108 "nav_title": f"{project} ({today})",
109 "master_doc": False,
110 "nav_links": [
111 {
112 "href": "genindex",
113 "internal": True,
114 "title": "Index",
115 },
116 {
117 "href": "https://html.spec.whatwg.org/",
118 "internal": False,
119 "title": "HTML Living Standard",
120 },
121 {
122 "href": "https://developer.mozilla.org/en-US/docs/Web/HTML",
123 "internal": False,
124 "title": "Mozilla HTML (MDN)",
125 },
126 {
127 "href": "https://en.wikipedia.org/wiki/HTML5",
128 "internal": False,
129 "title": "Wikipedia HTML5",
130 },
131 {
132 "href": "https://gdevops.gitlab.io/tuto_htmx/",
133 "internal": False,
134 "title": "htmx",
135 },
136 {
137 "href": "https://gdevops.gitlab.io/tuto_devops/",
138 "internal": False,
139 "title": "Tuto devops",
140 },
141 ],
142 "heroes": {
143 "index": "Tuto HTML",
144 },
145 "table_classes": ["plain"],
146}
147
148
149language = "en"
150html_last_updated_fmt = ""
151
152todo_include_todos = True
153
154html_use_index = True
155html_domain_indices = True
156
157copyright = f"2018-{now.year}, {author} Built with sphinx {sphinx.__version__} Python {platform.python_version()}"