Skip to content

Commit 8022401

Browse files
authored
Merge pull request #1232 from gusthoff/topic/infrastructure/sphinx/structure/20250606/furo_theme
Sphinx: migrating to Furo theme
2 parents 982423d + 99a40ed commit 8022401

File tree

16 files changed

+191
-844
lines changed

16 files changed

+191
-844
lines changed

frontend/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
coverage==7.8.0
22
docutils==0.21.2
3+
furo==2024.8.6
34
graphviz==0.20.3
45
ipython==9.1.0
56
pdf2image==1.17.0

frontend/requirements_frozen.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
alabaster==1.0.0
22
asttokens==3.0.0
33
babel==2.17.0
4+
beautifulsoup4==4.13.4
45
certifi==2025.1.31
56
charset-normalizer==3.4.1
67
coverage==7.8.0
78
decorator==5.2.1
89
docutils==0.21.2
910
executing==2.2.0
11+
furo==2024.8.6
1012
graphviz==0.20.3
1113
idna==3.10
1214
imagesize==1.4.1
@@ -36,8 +38,10 @@ roman-numerals-py==3.1.0
3638
setuptools==79.0.1
3739
six==1.17.0
3840
snowballstemmer==2.2.0
41+
soupsieve==2.7
3942
Sphinx==8.1.3
4043
sphinx-reredirects==0.1.6
44+
sphinx-basic-ng==1.0.0b2
4145
sphinx-rtd-theme==3.0.2
4246
sphinxcontrib-applehelp==2.0.0
4347
sphinxcontrib-bibtex==2.6.3

frontend/sphinx/_templates/footer.html

Lines changed: 0 additions & 75 deletions
This file was deleted.

frontend/sphinx/_templates/layout.html

Lines changed: 0 additions & 43 deletions
This file was deleted.

frontend/sphinx/conf.py

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ def get_file_from_conf_ini(path_to_file):
104104
'sphinx.ext.graphviz',
105105
'sphinx.ext.extlinks',
106106
'widget_extension',
107-
'sphinx_rtd_theme',
108107
'sphinx_reredirects',
109108
'sphinxcontrib.plantuml',
110109
]
@@ -183,6 +182,7 @@ def get_file_from_conf_ini(path_to_file):
183182

184183
# The name of the Pygments (syntax highlighting) style to use.
185184
pygments_style = 'sphinx'
185+
pygments_dark_style = "monokai"
186186

187187
nitpicky = True
188188

@@ -232,8 +232,7 @@ def get_file_from_conf_ini(path_to_file):
232232
# The theme to use for HTML and HTML Help pages. See the documentation for
233233
# a list of builtin themes.
234234
#
235-
#html_theme = 'learn_theme'
236-
html_theme = 'sphinx_rtd_theme'
235+
html_theme = 'furo'
237236

238237
if 'GEN_LEARN_SITE' in os.environ and os.environ['GEN_LEARN_SITE'] == "yes":
239238
html_title = "learn.adacore.com"
@@ -245,24 +244,32 @@ def get_file_from_conf_ini(path_to_file):
245244

246245
html_theme_path = ['.'] # make sphinx search for themes in current dir
247246

247+
html_css_files = [
248+
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/fontawesome.min.css",
249+
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/solid.min.css",
250+
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/brands.min.css",
251+
]
252+
248253
# Theme options are theme-specific and customize the look and feel of a theme
249254
# further. For a list of options available for each theme, see the
250255
# documentation.
251256
#
252257
html_theme_options = {
253-
'logo_only': True,
254-
'flyout_display': 'hidden',
255-
'version_selector': False,
256-
'prev_next_buttons_location': 'bottom',
257-
'style_external_links': False,
258-
'vcs_pageview_mode': '',
259-
# 'style_nav_header_background': 'white',
260-
# Toc options
261-
'collapse_navigation': False,
262-
'sticky_navigation': False,
263-
'navigation_depth': 4,
264-
'includehidden': True,
265-
'titles_only': False
258+
# furo options
259+
260+
# 'light_css_variables': {
261+
# },
262+
# 'dark_css_variables': {
263+
# }
264+
'sidebar_hide_name': True,
265+
'navigation_with_keys': True,
266+
'top_of_page_buttons': ["view", "edit"],
267+
# 'announcement': "",
268+
# 'footer_icons': [],
269+
270+
"source_repository": "https://github.com/AdaCore/learn",
271+
"source_branch": "master",
272+
"source_directory": "content/",
266273
}
267274

268275
html_show_sphinx = False
@@ -271,6 +278,9 @@ def get_file_from_conf_ini(path_to_file):
271278
html_logo = "img/logo.svg"
272279
else:
273280
html_logo = "img/logo_sandbox.svg"
281+
html_theme_options["announcement"] = \
282+
"<p>⚠️ This version of the website contains UNPUBLISHED contents. " \
283+
"⚠️</p>"
274284

275285
html_favicon = "img/favicon.ico"
276286

frontend/sphinx/img/favicon.ico

0 Bytes
Binary file not shown.
84.7 KB
Loading

frontend/sphinx/img/logo.png

-4.31 KB
Loading

0 commit comments

Comments
 (0)