Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2704276rwi; Tue, 11 Oct 2022 12:10:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Lz7hHI3N0qc7ENUCJrjTzdCFEHzDWXgHfHA95JiKKp0vgiqSnGDeP/+sv00HRAUYcpxDG X-Received: by 2002:a17:907:8b0f:b0:783:6169:5bc5 with SMTP id sz15-20020a1709078b0f00b0078361695bc5mr20683871ejc.200.1665515446935; Tue, 11 Oct 2022 12:10:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665515446; cv=none; d=google.com; s=arc-20160816; b=v5PbOeF+G0IFUdU87ElYgygSLqym7+5KcmP5OBHmQzuYSbYHys69/XmAbKvXjpjPTv BsoW2UMxoSVLZyq1x5/0ZDqR4JTKEkZ9ZBmRbWa2fWyQaCt/IGng8EoznGRvTmpP1i3p MeoLDfSpoo0hoNQEoZceM5N+aRtb3xizCplQqmzCBu9NNk2z/HvgMLIVnfzkZ8LLy0qf +WcL+Yk6aXr2BmyhpZUM1z82gHB+xmho3VH15n7aJE3J2pzJDCVmHUdbu9pGLQqxdZh/ ZqRAVYNT+gU9+ppExcbn6KcHR8SiMFJAGcit6pay2XXSa/Ql0YgteLn5s7RGYUp8GamQ 2KlQ== 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:dkim-filter; bh=ckcgg3Uja/Sjo6M8PxQ0qtiwcNDWpwwCvMJ3lQlDvhQ=; b=GQKEdhwnsjHzuym1Ev/IQguxcibZwo2o6W34ExtUhQWSxhtWYBH+EJBLAgXJWgPRs3 sdX3mEFv5Jxgqyp3WBBOrWdRv+K8HABPeejFD3UvLh83ncgtPNKQXg6SezN8nHgrUV64 zOy7WKGK1v2TlQg2gxpYfN2qI4i9k3pUdkPGPXjlQgEucRFRomNLLs/Ysoiu+MiPm7wm beM9S6x4xbeUQXVfmukEtIOM4OK+7TYT1vdKsO09V9EFEbNGwXIDM/9eyZNO2xbXBwQn pDkodrnvK3dsdm1URkHtQRAceW5KLTuwkHE0wrYCRDZsvRUU0JnIlY0NWl0J8sZENnYw dKJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=dnjNhMgN; 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 hw8-20020a170907a0c800b0078db1343eedsi4426883ejc.774.2022.10.11.12.10.20; Tue, 11 Oct 2022 12:10: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=dnjNhMgN; 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 S229808AbiJKTBC (ORCPT + 99 others); Tue, 11 Oct 2022 15:01:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229624AbiJKTA7 (ORCPT ); Tue, 11 Oct 2022 15:00:59 -0400 Received: from ms.lwn.net (ms.lwn.net [IPv6:2600:3c01:e000:3a1::42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3EEA82D01; Tue, 11 Oct 2022 12:00:57 -0700 (PDT) Received: from meer.lwn.net (unknown [IPv6:2601:281:8300:73::5f6]) by ms.lwn.net (Postfix) with ESMTPA id E84F37DE; Tue, 11 Oct 2022 19:00:56 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net E84F37DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1665514857; bh=ckcgg3Uja/Sjo6M8PxQ0qtiwcNDWpwwCvMJ3lQlDvhQ=; h=From:To:Cc:Subject:Date:From; b=dnjNhMgNLM1J/lXlq2X6Yp8BzCt46CYhmTneJGPdXM9ZCUsJ3ipbEjgUeI+mkhICn uYBe2pUo2wWMzPNWsUaPxAwPdlqkKk2ZQQWnFtjUtqFIRwiqqBGTApJqaDMCVwKCMh S5btu7ELATcwEMWneB0EDYWxz2euNIGpm+CblgTY0sLBeCfQY5eYtNhl4FVd5dfAbY daoXI1ATkfigQWDIRlX2nBOC66O+tANQAAxnRtpF5Nba9+oUE8ZOpDJKb+hmTt9UZr F8qdk6/nXvxIz8VKIcmmcpqjZp+eVPAVEQq90RlF9Wrhdr7C9jfzN2q7rfeWGGTqk8 90JPSK8UgRQcg== From: Jonathan Corbet To: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Jani Nikula , Mauro Carvalho Chehab , Jonathan Corbet Subject: [PATCH v2 0/6] docs: Improvements to our HTML output Date: Tue, 11 Oct 2022 13:00:41 -0600 Message-Id: <20221011190047.749145-1-corbet@lwn.net> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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,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 For a long time we have rejoiced that our HTML output from Sphinx is far better than what we got from the old DocBook toolchain. But it still leaves a lot to be desired; the following is an attempt to improve the situation somewhat. Sphinx has a theming mechanism for HTML rendering. Since the kernel's adoption of Sphinx, we have been using the "Read The Docs" theme — a choice made in a bit of a hurry to have *something* while figuring out the rest. RTD is OK, but it is not hugely attractive, requires the installation of an extra package, and does not observe all of the Sphinx configuration parameters. Among other things, that makes it hard to put reasonable contents into the left column in the HTML output. The Alabaster theme is the default for Sphinx installations, and is bundled with Sphinx itself. It has (IMO) nicer output and gives us the control that we need. So: switch to Alabaster. Additional patches adjust the documentation and remove the RTD references from scripts/sphinx-pre-install. The penultimate patch changes the way that kerneldoc declarations are rendered to (IMO) improve readability. That requires some changes to kernel-doc to output a new container block and some CSS tweaks to improve things overall. It should be noted that I have a long history of inflicting ugly web designs on the net; this work is a start, but I think we could do far better yet. It would be great if somebody who actually enjoys working with CSS and such would help to improve what we have. As before, I've put a copy of the rendered docs at: https://static.lwn.net/kerneldoc/ To compare the kerneldoc changes specifically, pick a page that includes a lot of definitions; for example: https://static.lwn.net/kerneldoc/driver-api/media/drivers/frontends.html vs. https://www.kernel.org/doc/html/latest/driver-api/media/drivers/frontends.html ------- Changes from the initial version: - Tweak more alabaster style parameters, including the maximum page width. There will surely be disagreement over what the right value should be, but at least it's defined in units independent of screen resolution. - Remove "classic" theme configuration and a bunch of other conf.py cruft. - I've tried to answer all of the other comments, but a couple remain. The sidebar contents are unchanged; making that more useful will require some thought and work. The gray background on function prototypes that Jani pointed out is actually something I did intentionally, with the idea of making each declaration stand out better in the wall of text. I still think it's better but am not married to it if the world disagrees. - I've tested PDF and epub builds (no changes) and Sphinx back to v1.7. In the absence of objections I'll be putting this into docs-next after the merge window closes. We can (and surely will) tweak this forever, but at least it, I hope, shows a direction in which we can go. Jonathan Corbet (6): docs: Switch the default HTML theme to alabaster docs: tweak some Alabaster style parameters docs: update sphinx.rst to reflect the default theme change docs: sphinx-pre-install: don't require the RTD theme docs: improve the HTML formatting of kerneldoc comments docs: decruft Documentation/conf.py Documentation/conf.py | 204 ++++--------------------- Documentation/doc-guide/sphinx.rst | 16 +- Documentation/sphinx-static/custom.css | 28 ++++ Documentation/sphinx/requirements.txt | 1 - scripts/kernel-doc | 52 ++++--- scripts/sphinx-pre-install | 8 - 6 files changed, 91 insertions(+), 218 deletions(-) create mode 100644 Documentation/sphinx-static/custom.css -- 2.37.2