Skip to content

Commit a33ae83

Browse files
akiyksJonathan Corbet
authored andcommitted
docs/conf.py: Use about.html only in sidebar of alabaster theme
"about.html" is available only for the alabaster theme [1]. Unconditionally putting it to html_sidebars prevents us from using other themes which respect html_sidebars. Remove about.html from the initialization and insert it at the front for the alabaster theme. Link: [1] https://alabaster.readthedocs.io/en/latest/installation.html#sidebars Fixes: d5389d3 ("docs: Switch the default HTML theme to alabaster") Signed-off-by: Akira Yokosawa <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jonathan Corbet <[email protected]>
1 parent 31abfdd commit a33ae83

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Documentation/conf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,11 @@ def get_cline_version():
345345

346346
# Custom sidebar templates, maps document names to template names.
347347
# Note that the RTD theme ignores this
348-
html_sidebars = { '**': ["about.html", 'searchbox.html', 'localtoc.html', 'sourcelink.html']}
348+
html_sidebars = { '**': ['searchbox.html', 'localtoc.html', 'sourcelink.html']}
349+
350+
# about.html is available for alabaster theme. Add it at the front.
351+
if html_theme == 'alabaster':
352+
html_sidebars['**'].insert(0, 'about.html')
349353

350354
# Output file base name for HTML help builder.
351355
htmlhelp_basename = 'TheLinuxKerneldoc'

0 commit comments

Comments
 (0)