Message ID | 20221027104406.549734-1-daniel.vetter@ffwll.ch |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp157310wru; Thu, 27 Oct 2022 03:54:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7TX5blFowBv1tpTsmKpvnBW1lOwsjGr6UVPulpgsaYUpy+e4sTsv/rzs14V6wrljRbZioW X-Received: by 2002:a17:90b:4d0d:b0:1fb:a86d:e752 with SMTP id mw13-20020a17090b4d0d00b001fba86de752mr9512681pjb.120.1666868065452; Thu, 27 Oct 2022 03:54:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666868065; cv=none; d=google.com; s=arc-20160816; b=0UT1wTSsWZzhtftmXJc/I5JDLYEwIkAh5LyWotjdRJxpuffpEw0LlMAtjvruc+UDEw XJfXbao4iYGd+PHZQbgMJMr7r0kmtZp3Wq7Y6z2i1qz0XqD0RqgIXjArjzuwLl4sox/A bFtaaYcVm1mVzTHl+A2GpD3QXLGGQ2bkoSQCflNgdYgqCGei3sfYsjYIz4FCp+J3LSzQ 2BquuVSlbeYdWTWiI+H93gO3X/ozYhgLkjIW7d27OOVoQHn627mfpDnPcVx1folNs3cz kbM2BcZBgI0LQiSY7F2EKs+gqFf4qy0DRjNteYIPOlr4DbH40t/ZUP0M6kwPNHocBZTN HNXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=giuiXYYLk+f5QLS50ASlMusr4jOA07sul4BoLmCP2Tg=; b=0Opu1Ogj5ouMhLial2KRLOfEaY907Uq3i4Y439BCYk80CT8X456orYynxa39aMLa3Q qBXj4yN2x7vLp/NQszz+meAuMk6BSkrXKv/iZFHWCJhifZGRM9y8puoFfwB455H8YloB fcElPBoa9MgyQFsDNC+pZvQFsQjiMfn488TZHUz24sCvUqL8miyRxjAsAXWuQrZLU3PF 3L/YwljKXAFr11YvMjkv6krwhlmiFfNXcSv/BnNw6iVpj7UJvPx0gfXrwnJxNMQ5TaG8 aYRFyYv8CnsQsnpjozjaqjYUy0ko+044eaR2lPLe8vdVYYn9CtzsTvRHvT988DPaXHLq wMLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=IN9rKSLQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020a170903228e00b00186a2274386si1380440plh.469.2022.10.27.03.54.12; Thu, 27 Oct 2022 03:54:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=IN9rKSLQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234955AbiJ0KoO (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Thu, 27 Oct 2022 06:44:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233548AbiJ0KoM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Oct 2022 06:44:12 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 760DDA87AE for <linux-kernel@vger.kernel.org>; Thu, 27 Oct 2022 03:44:10 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id b12so1959485edd.6 for <linux-kernel@vger.kernel.org>; Thu, 27 Oct 2022 03:44:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=giuiXYYLk+f5QLS50ASlMusr4jOA07sul4BoLmCP2Tg=; b=IN9rKSLQysrc1zS8/Aoy0aq5vrB08zsUfVBZNbxbclZikymid0Wk8I3Lp7v/HwF4GB rV8Ar7hRJgWBBNYj406pMQkOXFslXJbPhUoLOUPKAWyYwJWp1C532zZC3zoKvfAHbSjS KRHuRUanvg2fCyM5XUnSGVsrL4XRBVeVYoWHY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=giuiXYYLk+f5QLS50ASlMusr4jOA07sul4BoLmCP2Tg=; b=C+lmwW2QAveiUPhSTbFS304ctbzud9hXgpPW9Io+EWJlsmhizjmAw4H6ntebApcwVK 4u7IXLt6i9qxnci3U4BJGWMtwVQc+nMGQHjTEMyZpNhekk3MCMoiKRTQrlMrY8/rlvF2 IMHA+YXR33im4Ot4R9d4EZuNKMIlI3lpEV0QIRfNi3wmmZEK8OudKatfip5D2htHa/+E uQDvaDjg8MoqGauCzV5hiEHAGqlaYAORSbLcsialJTphQecDPRg6E2vU//hkJdyCngDB y1ONsZt6cvhmugEIPLJK5P9w1ypL0yDnbEjspqiNR7sUNocCz3Lq/kVmqdfqknNuQW8V l/8Q== X-Gm-Message-State: ACrzQf0vv4ziWxNOyNWjpv2xGd2UKFKgSoklWNfMezPC+ckeL/chbK8F ikkqP7QYgVADEPBESB9N5FBqezZISwSpdQ== X-Received: by 2002:a05:6402:5291:b0:45c:3f6a:d4bc with SMTP id en17-20020a056402529100b0045c3f6ad4bcmr44696532edb.285.1666867448979; Thu, 27 Oct 2022 03:44:08 -0700 (PDT) Received: from phenom.ffwll.local (212-51-149-33.fiber7.init7.net. [212.51.149.33]) by smtp.gmail.com with ESMTPSA id n1-20020aa7c441000000b00461c6e8453dsm774012edr.23.2022.10.27.03.44.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 03:44:08 -0700 (PDT) From: Daniel Vetter <daniel.vetter@ffwll.ch> To: DRI Development <dri-devel@lists.freedesktop.org> Cc: LKML <linux-kernel@vger.kernel.org>, Daniel Vetter <daniel.vetter@ffwll.ch>, Daniel Vetter <daniel.vetter@intel.com>, Jonathan Corbet <corbet@lwn.net>, linux-doc@vger.kernel.org Subject: [PATCH] docs/sphinx: More depth in the rtd sidebar toc Date: Thu, 27 Oct 2022 12:44:06 +0200 Message-Id: <20221027104406.549734-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747837848676100632?= X-GMAIL-MSGID: =?utf-8?q?1747837848676100632?= |
Series |
docs/sphinx: More depth in the rtd sidebar toc
|
|
Commit Message
Daniel Vetter
Oct. 27, 2022, 10:44 a.m. UTC
We love to nest our documenation for good structure, but that means
the table of contents needs to keep up or you can't navigate them.
Realized this trying to find the drm property documentation, which
with some shuffling around disappeared. Why I didn't realize we can do
this earlier, no idea.
Since the relevant parts of the toc are only loaded if you're in the
right .html file there's no harm in going all the way to unlimited.
Note that this has no impact on the classic theme (which doesn't have
the sidebar) nor on the various :toctree: rendered inline in the
output.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
---
Documentation/conf.py | 4 ++++
1 file changed, 4 insertions(+)
Comments
Daniel Vetter <daniel.vetter@ffwll.ch> writes: > We love to nest our documenation for good structure, but that means > the table of contents needs to keep up or you can't navigate them. > > Realized this trying to find the drm property documentation, which > with some shuffling around disappeared. Why I didn't realize we can do > this earlier, no idea. > > Since the relevant parts of the toc are only loaded if you're in the > right .html file there's no harm in going all the way to unlimited. > > Note that this has no impact on the classic theme (which doesn't have > the sidebar) nor on the various :toctree: rendered inline in the > output. > > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> > Cc: Jonathan Corbet <corbet@lwn.net> > Cc: linux-doc@vger.kernel.org > --- > Documentation/conf.py | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Documentation/conf.py b/Documentation/conf.py > index 934727e23e0e..5dc141c66726 100644 > --- a/Documentation/conf.py > +++ b/Documentation/conf.py > @@ -240,6 +240,10 @@ if html_theme == 'sphinx_rtd_theme' or html_theme == 'sphinx_rtd_dark_mode': > # Add color-specific RTD normal mode > html_css_files.append('theme_rtd_colors.css') > > + html_theme_options = { > + 'navigation_depth': -1, > + } > + > except ImportError: > html_theme = 'classic' So this patch isn't against docs-next, and applies to the RTD theme, which is no longer the default. I have no objection to it, but have you looked at how your docs come out with the alabaster theme? Thanks, jon
On Fri, 28 Oct 2022 at 20:19, Jonathan Corbet <corbet@lwn.net> wrote: > > Daniel Vetter <daniel.vetter@ffwll.ch> writes: > > > We love to nest our documenation for good structure, but that means > > the table of contents needs to keep up or you can't navigate them. > > > > Realized this trying to find the drm property documentation, which > > with some shuffling around disappeared. Why I didn't realize we can do > > this earlier, no idea. > > > > Since the relevant parts of the toc are only loaded if you're in the > > right .html file there's no harm in going all the way to unlimited. > > > > Note that this has no impact on the classic theme (which doesn't have > > the sidebar) nor on the various :toctree: rendered inline in the > > output. > > > > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> > > Cc: Jonathan Corbet <corbet@lwn.net> > > Cc: linux-doc@vger.kernel.org > > --- > > Documentation/conf.py | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/Documentation/conf.py b/Documentation/conf.py > > index 934727e23e0e..5dc141c66726 100644 > > --- a/Documentation/conf.py > > +++ b/Documentation/conf.py > > @@ -240,6 +240,10 @@ if html_theme == 'sphinx_rtd_theme' or html_theme == 'sphinx_rtd_dark_mode': > > # Add color-specific RTD normal mode > > html_css_files.append('theme_rtd_colors.css') > > > > + html_theme_options = { > > + 'navigation_depth': -1, > > + } > > + > > except ImportError: > > html_theme = 'classic' > > So this patch isn't against docs-next, and applies to the RTD theme, > which is no longer the default. I have no objection to it, but have you > looked at how your docs come out with the alabaster theme? [sorry took a bit longer to get back to this] Hm looks pretty, but more in a print style than using it dynamically, you can't really click through the sidebar toc at all to quickly find something, and if you're wrong, navigate up a few levels again. It's just the toc for exactly the local document, nothing else at all. rtd theme always gives you the full toc all the way up, and if you have epic patience could actually give you the full toc on every document (but that's probably not a good idea for the kernel). Do you need me to send the rebased version or can you smash this one in? btw on today's linux-next the sphinx.rst page isn't updated with the new default theme choice of alabaster. That seems to have been forgotten. -Daniel
On Mon, 7 Nov 2022 at 21:06, Daniel Vetter <daniel.vetter@ffwll.ch> wrote: > > On Fri, 28 Oct 2022 at 20:19, Jonathan Corbet <corbet@lwn.net> wrote: > > > > Daniel Vetter <daniel.vetter@ffwll.ch> writes: > > > > > We love to nest our documenation for good structure, but that means > > > the table of contents needs to keep up or you can't navigate them. > > > > > > Realized this trying to find the drm property documentation, which > > > with some shuffling around disappeared. Why I didn't realize we can do > > > this earlier, no idea. > > > > > > Since the relevant parts of the toc are only loaded if you're in the > > > right .html file there's no harm in going all the way to unlimited. > > > > > > Note that this has no impact on the classic theme (which doesn't have > > > the sidebar) nor on the various :toctree: rendered inline in the > > > output. > > > > > > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> > > > Cc: Jonathan Corbet <corbet@lwn.net> > > > Cc: linux-doc@vger.kernel.org > > > --- > > > Documentation/conf.py | 4 ++++ > > > 1 file changed, 4 insertions(+) > > > > > > diff --git a/Documentation/conf.py b/Documentation/conf.py > > > index 934727e23e0e..5dc141c66726 100644 > > > --- a/Documentation/conf.py > > > +++ b/Documentation/conf.py > > > @@ -240,6 +240,10 @@ if html_theme == 'sphinx_rtd_theme' or html_theme == 'sphinx_rtd_dark_mode': > > > # Add color-specific RTD normal mode > > > html_css_files.append('theme_rtd_colors.css') > > > > > > + html_theme_options = { > > > + 'navigation_depth': -1, > > > + } > > > + > > > except ImportError: > > > html_theme = 'classic' > > > > So this patch isn't against docs-next, and applies to the RTD theme, > > which is no longer the default. I have no objection to it, but have you > > looked at how your docs come out with the alabaster theme? > > [sorry took a bit longer to get back to this] > > Hm looks pretty, but more in a print style than using it dynamically, > you can't really click through the sidebar toc at all to quickly find > something, and if you're wrong, navigate up a few levels again. It's > just the toc for exactly the local document, nothing else at all. rtd > theme always gives you the full toc all the way up, and if you have > epic patience could actually give you the full toc on every document > (but that's probably not a good idea for the kernel). Do you need me > to send the rebased version or can you smash this one in? > > btw on today's linux-next the sphinx.rst page isn't updated with the > new default theme choice of alabaster. That seems to have been > forgotten. Sorry got confused on this and looked at the wrong tab/build output locally, it's good. Anyway I sent out a rebased version of the rtd patch, I do like that sidebar a lot more for navigating the docs :-) -Daniel
diff --git a/Documentation/conf.py b/Documentation/conf.py index 934727e23e0e..5dc141c66726 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -240,6 +240,10 @@ if html_theme == 'sphinx_rtd_theme' or html_theme == 'sphinx_rtd_dark_mode': # Add color-specific RTD normal mode html_css_files.append('theme_rtd_colors.css') + html_theme_options = { + 'navigation_depth': -1, + } + except ImportError: html_theme = 'classic'