diff --git a/docs/_static/style.css b/docs/_static/style.css
index 4354344ec42b..abe6e0a54287 100644
--- a/docs/_static/style.css
+++ b/docs/_static/style.css
@@ -15,7 +15,15 @@ Historically however, thanks to:
* {
box-sizing: border-box;
}
+/*Overriding undesired elements.*/
+nav.contents,
+aside.topic {
+ border: none;
+ padding: inherit!important;
+ margin: inherit!important;
+}
+/* root*/
section {
word-break: break-word;
}
@@ -250,7 +258,10 @@ a:hover {
text-decoration: underline;
color: var(--link-hover-text);
}
-
+a:visited {
+ text-decoration: none;
+ color: var(--link-text);
+}
/* headers */
header.grid-item {
@@ -273,7 +284,10 @@ header > nav {
header > nav a {
color: var(--white);
}
-
+header > nav > a:visited {
+ color: var(--white);
+ text-decoration: underline;
+}
header > nav.mobile-only {
width: 100%;
position: absolute;
diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html
index 925fda14b56d..e2342e69a31a 100644
--- a/docs/_templates/layout.html
+++ b/docs/_templates/layout.html
@@ -32,14 +32,19 @@
{{ "}" }}
{%- for js in script_files %}
+
+ {%- if js!="_static/documentation_options.js" %}
{{ js_tag(js) }}
+ {%- else %}
+
+ {%-endif %}
{%- endfor %}
{%- endblock %}
{%- if pageurl %}
{%- endif %}
- {%- if favicon %}
-
+ {%- if favicon_url %}
+
{%- endif %}
{%- block linktags %}
{%- if hasdoc('about') %}
diff --git a/docs/conf.py b/docs/conf.py
index 28b39452cfba..a9f0cb53e4d3 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -374,6 +374,8 @@ def _i18n_warning_filter(record: logging.LogRecord) -> bool:
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
+#Create table of contents entries for domain objects (e.g. functions, classes, attributes, etc.). Default is True.
+toc_object_entries=False
def setup(app):
if app.config.language == 'ja':
app.config.intersphinx_mapping['py'] = ('https://docs.python.org/ja/3', None)
diff --git a/docs/extensions/builder.py b/docs/extensions/builder.py
index ac48c8221434..50ac74f638b9 100644
--- a/docs/extensions/builder.py
+++ b/docs/extensions/builder.py
@@ -1,13 +1,38 @@
+import datetime
+import os
+import re
+
+from sphinx.builders.gettext import GettextRenderer, I18nBuilder, MessageCatalogBuilder, should_write
from sphinx.builders.html import StandaloneHTMLBuilder
-from sphinx.builders.gettext import MessageCatalogBuilder, I18nBuilder, timestamp, ltz, should_write, GettextRenderer
+from sphinx.environment.adapters.indexentries import IndexEntries
from sphinx.locale import __
-from sphinx.util import status_iterator
from sphinx.util.osutil import ensuredir
-from sphinx.environment.adapters.indexentries import IndexEntries
from sphinx.writers.html5 import HTML5Translator
-import datetime
-import os
-import re
+
+try:
+ # Latest sphinx version lets you import ctime directly.
+ from sphinx import version_info
+
+ comp = version_info[:3]
+ if comp >= (7, 2, 0):
+ from sphinx.builders.gettext import ctime
+ from sphinx.util.display import status_iterator
+ else:
+ from sphinx.builders.gettext import ltz, timestamp
+
+ ctime = datetime.datetime.fromtimestamp(timestamp, ltz).strftime('%Y-%m-%d %H:%M%z')
+ from sphinx.util import status_iterator
+
+except Exception as exc:
+ # Fallback
+ import time
+
+ if (source_date_epoch := os.getenv('SOURCE_DATE_EPOCH')) is not None:
+ timestamp = time.gmtime(float(source_date_epoch))
+ else:
+ # determine timestamp once to remain unaffected by DST changes during build
+ timestamp = time.localtime()
+ ctime = time.strftime('%Y-%m-%d %H:%M%z', timestamp)
class DPYHTML5Translator(HTML5Translator):
@@ -69,7 +94,7 @@ def finish(self) -> None:
'project': self.config.project,
'last_translator': self.config.gettext_last_translator,
'language_team': self.config.gettext_language_team,
- 'ctime': datetime.datetime.fromtimestamp(timestamp, ltz).strftime('%Y-%m-%d %H:%M%z'),
+ 'ctime': ctime,
'display_location': self.config.gettext_location,
'display_uuid': self.config.gettext_uuid,
}
diff --git a/docs/extensions/details.py b/docs/extensions/details.py
index 302e250c7f19..bea2ef138aae 100644
--- a/docs/extensions/details.py
+++ b/docs/extensions/details.py
@@ -1,5 +1,5 @@
from docutils.parsers.rst import Directive
-from docutils.parsers.rst import states, directives
+from docutils.parsers.rst import directives
from docutils.parsers.rst.roles import set_classes
from docutils import nodes
diff --git a/setup.py b/setup.py
index ffe3057fe305..87af67f4648e 100644
--- a/setup.py
+++ b/setup.py
@@ -35,7 +35,7 @@
extras_require = {
'voice': ['PyNaCl>=1.3.0,<1.6'],
'docs': [
- 'sphinx==4.4.0',
+ 'sphinx==7.1.2',
'sphinxcontrib_trio==1.1.2',
# TODO: bump these when migrating to a newer Sphinx version
'sphinxcontrib-websupport==1.2.4',