[PATCH v2 3/7] docs: reconfigure the HTML left column

Jonathan Corbet posted 4 patches 3 years, 6 months ago
There is a newer version of this series
[PATCH v2 3/7] docs: reconfigure the HTML left column
Posted by Jonathan Corbet 3 years, 6 months ago
Use the html_sidebars directive to get a more useful set of links in the
left column.

Unfortunately, this is a no-op with the default RTD theme, but others
observe it.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
 Documentation/conf.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index 78dd6d1e7b88..22c9d4df1967 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -370,7 +370,8 @@ html_static_path = ['sphinx-static']
 html_use_smartypants = False
 
 # Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
+# Note that the RTD theme ignores this
+html_sidebars = { '**': ['searchbox.html', 'localtoc.html', 'sourcelink.html']}
 
 # Additional templates that should be rendered to pages, maps page names to
 # template names.
-- 
2.37.2
Re: [PATCH v2 3/7] docs: reconfigure the HTML left column
Posted by David Vernet 3 years, 6 months ago
On Thu, Sep 22, 2022 at 02:41:34PM -0600, Jonathan Corbet wrote:
> Use the html_sidebars directive to get a more useful set of links in the
> left column.
> 
> Unfortunately, this is a no-op with the default RTD theme, but others
> observe it.
> 
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>

Reviewed-by: David Vernet <void@manifault.com>

> ---
>  Documentation/conf.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/conf.py b/Documentation/conf.py
> index 78dd6d1e7b88..22c9d4df1967 100644
> --- a/Documentation/conf.py
> +++ b/Documentation/conf.py
> @@ -370,7 +370,8 @@ html_static_path = ['sphinx-static']
>  html_use_smartypants = False
>  
>  # Custom sidebar templates, maps document names to template names.
> -#html_sidebars = {}
> +# Note that the RTD theme ignores this

nit: Should this comment end in a period to match the format used in the
rest of the file?

> +html_sidebars = { '**': ['searchbox.html', 'localtoc.html', 'sourcelink.html']}
>  
>  # Additional templates that should be rendered to pages, maps page names to
>  # template names.
> -- 
> 2.37.2
>