Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp480380rwb; Wed, 5 Oct 2022 23:16:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM75hJUvM3SWfUkLOCR8OMa7QfV2/7ntwovIZfX3yyqoOPg+3fhXgNWxZ8E+KeCS9Q5jJRlV X-Received: by 2002:a17:907:7e9d:b0:782:3601:7d01 with SMTP id qb29-20020a1709077e9d00b0078236017d01mr2627269ejc.361.1665037011408; Wed, 05 Oct 2022 23:16:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665037011; cv=none; d=google.com; s=arc-20160816; b=LIz7HC6H9WVFGdOhuOzOwqDUbV8M4ih1QH/ThnMaZBYv7/i+i68rY3xviRBz9sdLw5 uOydkWxuAygmo2nm0kCgYzCxX6XdLIEKRd/Mtxtlnq30kNqUNu2HA4MXTaFy4165eJ1u WV22rSd1dYXKi/Pcfwl9zD8FbUCZHfibK8g0TX/aGf6riYpF0gYb49aJCgjAC3E2luyH 8ZMrRXfH0AyaqwDpdQE82Hnh2ay5m1WjfQg+U3x4Ca0rjXUFpA4n3vwWtSYhYPvxUp12 hU2jz3lDHW9t72wqIevjrzTG+TE+G7RX4fDZDCuUvdkGEQMn7JDjb8/iJW2HCBvkDMmH LwIg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=3ejkw6Lt4c9m2vaekvwihOd7YyI8uGXex5LxZN9eOLc=; b=j0Rb7lh7m9NWC8KZPR2RYGicc/hBt19JkXXM8ve5swaKGnqn2lgcy6Ubq+prwGmu7M lgJwgp8ZeFUy2yKUZeD57cPF6LWVNttemiqm2UNfo8pxAehPUH8zby6XM8fXWOmMqxWD FvPiVKLx58PxKt+Q+hAk083KzACIGIH7taCTfDHwYFsYIU1CTnxWHaAkPLEK97aXDzbT FcReuWSnuXEKf08V/ZOrgl0CpQKIDxVIwtlFQltSV7yU6Q190HqGdbg3zn7G1V79Ny+L 2/crJtkxC5qGX7xbblLkc3ZvXfVLvOD6YTkPzvjcU1ytJqKLHLizKmgKNFvk75gnG2v4 MX8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SzkSZIC5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb13-20020a1709076d8d00b0078bfe57fc78si8655534ejc.987.2022.10.05.23.16.23; Wed, 05 Oct 2022 23:16:51 -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=@kernel.org header.s=k20201202 header.b=SzkSZIC5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229897AbiJFFSD (ORCPT + 99 others); Thu, 6 Oct 2022 01:18:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229966AbiJFFR6 (ORCPT ); Thu, 6 Oct 2022 01:17:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B51B870A7; Wed, 5 Oct 2022 22:17:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D450761825; Thu, 6 Oct 2022 05:17:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAAFEC433D6; Thu, 6 Oct 2022 05:17:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665033476; bh=Ro9XHlh3/2Vqmy9HNWZSW+8vT6ftNGso62VAtEUozhc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=SzkSZIC5HcrTlEdoafqFJ+fiy5xPjY3VHjS7AUAL/4zpMfnEsLtM0iaQJxWwdJi9u GuGll/Wer4VwgcYF2Ah2I8pOzPv09tFaGpqCmVl8/25LvQ5a/mqkI7MzjGFaCR9EFx Nv2DF+uj9wbT6SySAYvIUaIZYdDrZrSWKLYTRI0TOWteiOaApRnXerGrUWdpesdNel bUTUwTkM2tfIITXiv/Mup5GpqsPGf49exc/X2IL6RyS/YVPDpJSI5nEAnLKz6r2edt 0LfMsD8dl5ZTDfGeI3fWBw70fx8clb6l6xYtAoFJKZxzVewkzXqNwmMV8QGJXMHJX4 jtVoJnFW1YV+A== Date: Thu, 6 Oct 2022 06:17:49 +0100 From: Mauro Carvalho Chehab To: Jonathan Corbet Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Jani Nikula Subject: Re: [PATCH 1/5] docs: Switch the default HTML theme to alabaster Message-ID: <20221006061749.18a68d08@sal.lan> In-Reply-To: <20221004201222.281845-2-corbet@lwn.net> References: <20221004201222.281845-1-corbet@lwn.net> <20221004201222.281845-2-corbet@lwn.net> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, 4 Oct 2022 14:12:18 -0600 Jonathan Corbet escreveu: > The read-the-docs theme is not entirely attractive and doesn't give us > control over the left column. "Alabaster" is deemed the default Sphinx > theme, it is currently maintained and shipped bundled with Sphinx itself, > so there is no need to install it separately. Switch over to this theme as > the default for building kernel documentation; the DOCS_THEME environment > variable can still be used to select a different theme. > > Signed-off-by: Jonathan Corbet > --- > Documentation/conf.py | 26 ++++++++++++++++++++++++-- > 1 file changed, 24 insertions(+), 2 deletions(-) > > diff --git a/Documentation/conf.py b/Documentation/conf.py > index 22c9d4df1967..629f4afeb0eb 100644 > --- a/Documentation/conf.py > +++ b/Documentation/conf.py > @@ -194,6 +194,24 @@ finally: > else: > version = release = "unknown version" > > +# > +# HACK: there seems to be no easy way for us to get at the version and > +# release information passed in from the makefile...so go pawing through the > +# command-line options and find it for ourselves. > +# > +def get_cline_version(): > + c_version = c_release = '' > + for arg in sys.argv: > + if arg.startswith('version='): > + c_version = arg[8:] > + elif arg.startswith('release='): > + c_release = arg[8:] > + if c_version: > + if c_release: > + return c_version + '-' + c_release > + return c_version > + return version # Whatever we came up with before > + > # The language for content autogenerated by Sphinx. Refer to documentation > # for a list of supported languages. > # > @@ -247,7 +265,7 @@ highlight_language = 'none' > # a list of builtin themes. > > # Default theme > -html_theme = 'sphinx_rtd_theme' > +html_theme = 'alabaster' > html_css_files = [] You should probably touch other parts of conf.py as well, folding your patch 1 with the enclosed diff - or some variant of it. Basically, the current logic is to try RTD. If not found, fall back to classic (which is also a native theme), customizing it a little bit to look closer to the way RTD outputs the sidebars, and adjusting some colors to make it look nicer. Regards, Mauro diff --git a/Documentation/conf.py b/Documentation/conf.py index 934727e23e0e..87f821287908 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -241,7 +241,7 @@ if html_theme == 'sphinx_rtd_theme' or html_theme == 'sphinx_rtd_dark_mode': html_css_files.append('theme_rtd_colors.css') except ImportError: - html_theme = 'classic' + html_theme = 'alabaster' if "DOCS_CSS" in os.environ: css = os.environ["DOCS_CSS"].split(" ") @@ -257,36 +257,6 @@ if major <= 1 and minor < 8: for l in html_css_files: html_context['css_files'].append('_static/' + l) -if html_theme == 'classic': - html_theme_options = { - 'rightsidebar': False, - 'stickysidebar': True, - 'collapsiblesidebar': True, - 'externalrefs': False, - - 'footerbgcolor': "white", - 'footertextcolor': "white", - 'sidebarbgcolor': "white", - 'sidebarbtncolor': "black", - 'sidebartextcolor': "black", - 'sidebarlinkcolor': "#686bff", - 'relbarbgcolor': "#133f52", - 'relbartextcolor': "white", - 'relbarlinkcolor': "white", - 'bgcolor': "white", - 'textcolor': "black", - 'headbgcolor': "#f2f2f2", - 'headtextcolor': "#20435c", - 'headlinkcolor': "#c60f0f", - 'linkcolor': "#355f7c", - 'visitedlinkcolor': "#355f7c", - 'codebgcolor': "#3f3f3f", - 'codetextcolor': "white", - - 'bodyfont': "serif", - 'headfont': "sans-serif", - } - sys.stderr.write("Using %s theme\n" % html_theme) # Theme options are theme-specific and customize the look and feel of a theme