Skip to content

Commit 00dd262

Browse files
committed
doc: use "furo" html theme instead of "sphinx-rtd-theme"
Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent 053d5c9 commit 00dd262

File tree

7 files changed

+25
-60
lines changed

7 files changed

+25
-60
lines changed

.hunspell.en.dic

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,3 +1294,5 @@ itrp
12941294
getCurrentModfileInterpName
12951295
evaluateModulefile
12961296
Ebuild
1297+
furo
1298+
rtd
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
/* Render literal-block like terminal output */
22
.section pre.literal-block, section pre.literal-block {
33
border-radius: 8px;
4-
background-color: #1e1e1e !important;
4+
background-color: #2b2b2b !important;
55
color: #ffffff;
66
}
7+
8+
/* Break long word in tables expect first cell of each row */
9+
table.docutils td:first-child p {
10+
word-break: normal;
11+
}
12+
table.docutils td p {
13+
word-break: break-word;
14+
}

doc/source/_static/rtd_literal_block.css

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

doc/source/_static/rtd_theme_overrides.css

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

doc/source/_static/terminal_output.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
.ps {
77
font-weight: bold;
8-
color: #fff5ca;
8+
color: #d4d0ab;
99
}
1010

1111
.sgrb {

doc/source/conf.py

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -118,21 +118,16 @@ def get_version_release_from_git():
118118
#
119119
os_rtd = os.environ.get('READTHEDOCS', None) == 'True'
120120
if os_rtd:
121-
html_theme = 'sphinx_rtd_theme'
122-
# override wide tables in RTD theme
123-
# colorize terminal output
124-
html_css_files = [
125-
'rtd_literal_block.css',
126-
'rtd_theme_overrides.css',
127-
'terminal_output.css',
128-
]
121+
html_theme = 'furo'
129122
else:
130123
html_theme = 'bizstyle'
131-
# colorize terminal output
132-
html_css_files = [
133-
'literal_block.css',
134-
'terminal_output.css',
135-
]
124+
125+
# colorize terminal output
126+
# handle large table
127+
html_css_files = [
128+
'literal_block.css',
129+
'terminal_output.css',
130+
]
136131

137132
# Theme options are theme-specific and customize the look and feel of a theme
138133
# further. For a list of options available for each theme, see the
@@ -141,21 +136,14 @@ def get_version_release_from_git():
141136
# html_theme_options = {}
142137
if os_rtd:
143138
html_theme_options = {
144-
'logo_only': True,
145-
}
146-
html_context = {
147-
'conf_py_path': '/doc/source/',
148-
'display_github': True,
149-
'github_user': 'envmodules',
150-
'github_repo': 'modules',
151-
'github_version': 'main',
139+
'sidebar_hide_name': True,
140+
'light_logo': '../../img/modules_red.svg',
141+
'dark_logo': '../../img/modules_white.svg',
152142
}
153143

154144
# The name of an image file (relative to this directory) to place at the top
155145
# of the sidebar.
156-
if os_rtd:
157-
html_logo = '../img/modules_white.svg'
158-
else:
146+
if not os_rtd:
159147
html_logo = '../img/modules_red.svg'
160148

161149
# The name of an image file (within the static path) to use as favicon of the

doc/source/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
sphinx
2-
sphinx-rtd-theme
2+
furo

0 commit comments

Comments
 (0)