Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp997157rwb; Tue, 4 Oct 2022 13:50:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4BfHPMHRqGrKGDSCEh32SZ47iSJiXM28Gb9e1G4FJvNgTLv22T49rpKzJRIK82jjG640j2 X-Received: by 2002:a17:90b:4b03:b0:202:a7e1:2c9a with SMTP id lx3-20020a17090b4b0300b00202a7e12c9amr1461169pjb.195.1664916646078; Tue, 04 Oct 2022 13:50:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664916646; cv=none; d=google.com; s=arc-20160816; b=qzi6mlvz3gMnQW9uJ+LFqjUbwW8M0l2ZvChXCAkb0PtLv3DLtLdC4y+VMmqFzgSdJw vKNO40NOk9F03jLdn7hO0S7IAmRaua5rwKmGU5Sce8D29yVugtinnUvVGaxYLGG8tfM0 HyITT0Ad6fmOarPAH+u2GCZO0W1r7E2s7C8XdpVkBzWNwHVk3jgSsvd3OPAMSnMRQpyi 5H7tzIFLOrbltUvWzTAttX/4upkBXEMcJ3Lz75bHwjlGlKprM997ahZxtLaV2i7LgkvV Q5y+yw2CpST+f22gLG6yhc5ijBW0eUmSZY5yDtMRrAxCXliTn2RdJn0p0cURvA0XTboV 5Nzg== 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:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=pTPVZaeeJh0pVq8eQZg8QLde/V+YESX5niUBMm79s9o=; b=Qt8qS1IXN0nWO/BMtoSCGWPZoA6QK1c/jYfhby+rMKPVsT6yJEQ0vFE1ZujhjzxFua YkOYueVtNsWRyXPtb6wv+gLoAhcnMRemf03RBO4gWwrMA7VLULiiLGQ5NBlLb4z21Y6V wq19pKjtIRJEfjnoyGxR5B6GJFu2LPkFbAuJu52QBBcAoOQJpWTedtjBN4LBLNWOjrj3 JxlIC1h+xLFmpKbVa+8B5S19cxd08UIaE7YbzF9thoX0aS+23lrAhhfw1bmpbvRMip74 hUBuxXfjUldCf6w8DRg3zDeMnjLq2TgQEuvHQ/v4OlVDFzCnwiWoJqSXT4mDIfkmfYlZ btLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=ZuBL3W96; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b16-20020a170902d51000b00176b3c7d158si13954749plg.99.2022.10.04.13.50.34; Tue, 04 Oct 2022 13:50:46 -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=@lwn.net header.s=20201203 header.b=ZuBL3W96; 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 S229760AbiJDUMk (ORCPT + 99 others); Tue, 4 Oct 2022 16:12:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbiJDUMh (ORCPT ); Tue, 4 Oct 2022 16:12:37 -0400 Received: from ms.lwn.net (ms.lwn.net [45.79.88.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5119526126; Tue, 4 Oct 2022 13:12:36 -0700 (PDT) Received: from meer.lwn.net (unknown [IPv6:2601:281:8300:73::5f6]) by ms.lwn.net (Postfix) with ESMTPA id 873884B0; Tue, 4 Oct 2022 20:12:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 873884B0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1664914355; bh=pTPVZaeeJh0pVq8eQZg8QLde/V+YESX5niUBMm79s9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZuBL3W96SMr+tG6HClnOWvrBUJrR0VDnq8Su03jY/0TbURTi2/7qW3i01/tCeX/ly uxY3WHJzqr23Z85MeXaUIJC9fbV3d4Yx0QquK5ezQX23RxmDhuIYKbUQDEG+NMNgUJ grTjXsBMTe0mK1VG184z5ipcsMGZQ68vV0hWSS4aRsIQgF+5706U0tx+gyxkdhP8xy GOotBOvAhTldlsBSl/6usiSyMFQylKYINYmDg1awwa4ILn1J7Vn4UVjEMKhRJgvtxC /fBpogGscw/fAadq6tFp31RxowRp4kIya1BXF/qODYtJmrbxMzUvWPoxfmQ/2nC2ux xCucCI+wjwE6A== From: Jonathan Corbet To: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Jani Nikula , Mauro Carvalho Chehab , Jonathan Corbet Subject: [PATCH 1/5] docs: Switch the default HTML theme to alabaster Date: Tue, 4 Oct 2022 14:12:18 -0600 Message-Id: <20221004201222.281845-2-corbet@lwn.net> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221004201222.281845-1-corbet@lwn.net> References: <20221004201222.281845-1-corbet@lwn.net> 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_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 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 = [] if "DOCS_THEME" in os.environ: @@ -324,6 +342,10 @@ if html_theme == 'classic': 'bodyfont': "serif", 'headfont': "sans-serif", } +else: + html_theme_options = { + 'description': get_cline_version(), + } sys.stderr.write("Using %s theme\n" % html_theme) @@ -371,7 +393,7 @@ html_use_smartypants = False # Custom sidebar templates, maps document names to template names. # Note that the RTD theme ignores this -html_sidebars = { '**': ['searchbox.html', 'localtoc.html', 'sourcelink.html']} +html_sidebars = { '**': ["about.html", 'searchbox.html', 'localtoc.html', 'sourcelink.html']} # Additional templates that should be rendered to pages, maps page names to # template names. -- 2.37.2