From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=45.79.88.28 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796241335; b=loKyof3e2hHQzAPT36g/sUXTTUxlSAY32z0WnNL6Xx1qcQ1TvxOpxg7iqCz4duqSLelk iGPTUb4OHoPG48cARWoCIaeFUcdH3SlEsoMHYGMby6pLxSJjku7HYZVnNWLmXS+Gjm2Is aouQndDaC7KmkmcEbFf8NdkuOtPKlNlPptyhawU/0UipX1UR/ytIe6To7tLbTEM7jcPFi EC4xR2sHq6pG4MM417V0KRxVcfocjGzNWr/y1R344UHFMdH5GFeZM0y/ozb480OAmePrI arttH8B5VOvBPG0sGPRtQxlpx/j4XHwoxv+0ehnRDoAd3pUn5YmSNWUwgFJjJtF4DRg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796241335; h=DMARC-Filter:DKIM-Filter:DKIM-Signature:Received:From:To:Cc:Subject: In-Reply-To:References:Date:Message-ID:MIME-Version:Content-Type; bh=1toJ48Q4jK9veY/aOiFhnTvbINrPYodzuXi0EMnMxq0=; b=wuQYnkk6Sioro3sXIEm6X79e0kNPe6+OCpNkKJjycokp6x1J8ZAeTKIbOqc3jkpexvdv eg4cVZUbGjtOwuVe0Xg7QHUnLtdyN3p1MgBwFm/Q/CyToul2xmnmZhyP/zKdSMta0OcvP /1m79/c+6b7B8QKtP5NaFB48xuCeW9G1rFl9L46b/6ULyqTweU7WtqV+HVu22HCokH5j+ h5T0kwmf16XXGzBxiYlE1TukeYzfHhX7J1xi91LUyucdzLhg5TQIsdwHU5eIo8YN4UYKm m8uCMEVv8cwrpRV+V2U6RJXoCwgXldnoEGNfAfHllDb5wURYIGPNcOTppl5YaAaTvQA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lwn.net; spf=pass smtp.mailfrom=lwn.net; dkim=pass header.d=lwn.net header.i=@lwn.net header.a=rsa-sha256 header.s=20201203 header.b=sBo85cz8; arc=none smtp.remote-ip=45.79.88.28 Received: from ms.lwn.net (ms.lwn.net [45.79.88.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C085606A322; Wed, 2 Dec 2026 19:55:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6C085606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lwn.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.a=rsa-sha256 header.s=20201203 header.b=sBo85cz8 DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 959AA40904 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1796241334; bh=1toJ48Q4jK9veY/aOiFhnTvbINrPYodzuXi0EMnMxq0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=sBo85cz8arFViztQECjQH9UGJDdNcnCwggqitc3TR2yKHDr/ogv2NN6zw14jLg+Vq iNQqTXKptRAJUlB14/sHEZK9J0SFjyeMlrwdauzJz0lEfqHkMTf7GXCsV2OTmRnaJh tOb/pdR6YeutXFILITO/+jROaLZwTFxAtxEJrg9P5//I3EQAjeDHbhGiEnSRZnEYNJ Xo6PTf8C52WPXEFosw9jkbVmS+QkTIH9Tme3bnWhTvLzjaoTpwkf3V3Ze00aL1jEu4 6ldalou+EH2UxytTYEnFv6YEsJf/LKFPeaK4qcqsE8eT0SYBDYtF3VH+Wtc2qCFGk1 O37gf9TItDrQg== Received: from localhost (unknown [IPv6:2601:280:4600:9f::1fe]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id 959AA40904; Wed, 2 Dec 2026 19:55:34 +0000 (UTC) From: Jonathan Corbet To: Sean Lyon Cc: Shuah Khan , Randy Dunlap , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Lyon Subject: Re: [PATCH] docs: conf.py: register sphinx_rtd_theme as an extension In-Reply-To: <20261119195117.32709-1-sean@seanlyon.dev> References: <20261119195117.32709-1-sean@seanlyon.dev> Date: Wed, 02 Dec 2026 12:55:33 -0700 Message-ID: <87zeuna24q.fsf@trenco.lwn.net> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain Sean Lyon writes: > The sphinx_rtd_theme sidebar has collapsible sections. The theme uses > jQuery to add the toctree-expand buttons that control them. > > Sphinx 6 stopped bundling jQuery. Since sphinx_rtd_theme 1.2.0, the > theme's setup() enables the sphinxcontrib-jquery extension to load it, > but setup() does not run when the theme is loaded through > html_theme_path. Without jQuery, the buttons are never added, so sidebar > sections cannot be collapsed. > > Register sphinx_rtd_theme as an extension so its setup() runs. The > setup() also registers the theme, so html_theme_path is no longer > needed, and sphinx_rtd_theme 3.0 warns that it is deprecated. > > Signed-off-by: Sean Lyon > --- > Note for testers: with Sphinx >= 8.1, some pages (e.g. core-api/) expand > more than one sidebar section. This also happens without this patch. It > comes from documents included in multiple toctrees. Sphinx warns about > these documents, but the warnings are only shown with make V=1 htmldocs. > I'm looking into this separately and plan to send an RFC. > > Tested with sphinx_rtd_theme 3.1.0 and sphinx_rtd_dark_mode 1.3.0 on > Sphinx 9.2.0, and on min_requirements.txt with sphinx_rtd_theme 1.3.0. > No new build warnings, and the get_html_theme_path deprecation warning > is gone. > > Documentation/conf.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/conf.py b/Documentation/conf.py > index 5ab26ce89daf..ed15bb80ef87 100644 > --- a/Documentation/conf.py > +++ b/Documentation/conf.py > @@ -385,7 +385,7 @@ if html_theme in ["sphinx_rtd_theme", "sphinx_rtd_dark_mode"]: > try: > import sphinx_rtd_theme > > - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] > + extensions.append("sphinx_rtd_theme") > Applied, thanks. jon