Linux Documentation
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: Antonin Godard <antonin.godard@bootlin.com>,
	Shuah Khan <skhan@linuxfoundation.org>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Antonin Godard <antonin.godard@bootlin.com>
Subject: Re: [PATCH 0/2] Documentation: html: show sections in the sidebar
Date: Mon, 03 Aug 2026 13:13:52 -0600	[thread overview]
Message-ID: <87cxvzxbin.fsf@trenco.lwn.net> (raw)
In-Reply-To: <20260803-show-sections-in-sidebar-v1-0-b4fdc847525d@bootlin.com>

Antonin Godard <antonin.godard@bootlin.com> writes:

> The current sidebar in the HTML version of the documentation does not
> display the section titles because the toctree directives in the
> top-level index.rst document do not contain ":caption:" properties.
> Replacing the current section titles by ":caption:" properties would not
> allow having text between those and the table of contents.
>
> To workaround this issue, add the ":caption:" properties in the toctree
> calls which makes them show up in the sidenbar, but hide them from the
> index page with a custom CSS addition.
>
> Additionally, make the section titles in the sidebar bold to make them
> stand-out.
>
> This makes the overall structure of the documentation clearer from the
> sidebar directly.
>
> PS: This is how I've implemented this in the Yocto Project
> documentation[1] where I faced the same issue. See also the index.rst
> file[2] (which was by the way inspired by the kernel's own index.rst)
> and CSS addition[3].
>
> [1]: https://docs.yoctoproject.org/dev/
> [2]: https://git.yoctoproject.org/yocto-docs/tree/documentation/index.rst
> [3]: https://git.yoctoproject.org/yocto-docs/tree/documentation/sphinx-static/theme_overrides.css#n106
>
> Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
> ---
> Antonin Godard (2):
>       Documentation: html: show sections in the sidebar
>       Documentation: html: make sidebar section titles bold
>
>  Documentation/index.rst                |  8 ++++++++
>  Documentation/sphinx-static/custom.css | 11 +++++++++++
>  2 files changed, 19 insertions(+)

This looks like it could be a nice improvement, but I have a couple of
thoughts...

- Did you check the PDF build to be sure that the captions don't intrude
  in some sort of obnoxious ways?

- I'd tweak the CSS to remove the white space below the section
  headings, just to bind them to their subsections properly.

Thanks,

jon

  parent reply	other threads:[~2026-08-03 19:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03 14:35 [PATCH 0/2] Documentation: html: show sections in the sidebar Antonin Godard
2026-08-03 14:35 ` [PATCH 1/2] " Antonin Godard
2026-08-03 17:20   ` Randy Dunlap
2026-08-03 14:35 ` [PATCH 2/2] Documentation: html: make sidebar section titles bold Antonin Godard
2026-08-03 17:20   ` Randy Dunlap
2026-08-03 19:13 ` Jonathan Corbet [this message]
2026-08-03 23:48   ` [PATCH 0/2] Documentation: html: show sections in the sidebar Randy Dunlap
2026-08-04 13:25     ` Jonathan Corbet
2026-08-04 13:59   ` Antonin Godard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cxvzxbin.fsf@trenco.lwn.net \
    --to=corbet@lwn.net \
    --cc=antonin.godard@bootlin.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox