[llvm-branch-commits] [libcxx] [libc++][docs] Use Furo theme (PR #223155)

Reid Kleckner via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Sep 30 11:51:54 PDT 2026


https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/223155

>From b86db22634b1c15f59077cf729ce89efcab77587 Mon Sep 17 00:00:00 2001
From: Reid Kleckner <rkleckner at nvidia.com>
Date: Sat, 12 Sep 2026 14:25:32 +0000
Subject: [PATCH] [libc++][docs] Use Furo theme

Adopt the shared LLVM Furo configuration and wyvern logo, widen the content area on desktop viewports, and remove page-local contents directives that duplicate Furo's navigation.
---
 libcxx/docs/AddingNewCIJobs.rst               |  3 ---
 libcxx/docs/CodingGuidelines.rst              |  3 ---
 .../docs/DesignDocs/CapturingConfigInfo.rst   |  3 ---
 .../docs/DesignDocs/ExperimentalFeatures.rst  |  3 ---
 .../docs/DesignDocs/ExtendedCXX03Support.rst  |  3 ---
 libcxx/docs/DesignDocs/FeatureTestMacros.rst  |  3 ---
 libcxx/docs/DesignDocs/FileTimeType.rst       |  3 ---
 .../docs/DesignDocs/ThreadingSupportAPI.rst   |  3 ---
 libcxx/docs/DesignDocs/VisibilityMacros.rst   |  3 ---
 libcxx/docs/Hardening.rst                     |  3 ---
 libcxx/docs/Helpers/ReleaseNotesTemplate.rst  |  4 ---
 libcxx/docs/ReleaseNotes/20.rst               |  4 ---
 libcxx/docs/ReleaseNotes/21.rst               |  4 ---
 libcxx/docs/ReleaseNotes/22.rst               |  4 ---
 libcxx/docs/ReleaseNotes/23.rst               |  4 ---
 libcxx/docs/ReleaseNotes/24.rst               |  4 ---
 libcxx/docs/Status/Cxx29.md                   |  3 ---
 libcxx/docs/TestingLibcxx.rst                 |  3 ---
 libcxx/docs/UserDocumentation.rst             |  3 ---
 libcxx/docs/VendorDocumentation.rst           |  3 ---
 libcxx/docs/_static/custom.css                | 20 +++++++++++++++
 libcxx/docs/conf.py                           | 25 ++++++-------------
 22 files changed, 28 insertions(+), 83 deletions(-)
 create mode 100644 libcxx/docs/_static/custom.css

diff --git a/libcxx/docs/AddingNewCIJobs.rst b/libcxx/docs/AddingNewCIJobs.rst
index 7a12728b98919..bb5b67c2ae112 100644
--- a/libcxx/docs/AddingNewCIJobs.rst
+++ b/libcxx/docs/AddingNewCIJobs.rst
@@ -4,9 +4,6 @@
 Adding New CI Jobs
 ==================
 
-.. contents::
-  :local:
-
 Adding The Job
 ==============
 
diff --git a/libcxx/docs/CodingGuidelines.rst b/libcxx/docs/CodingGuidelines.rst
index d91e3f22f36b6..c598c569c20f3 100644
--- a/libcxx/docs/CodingGuidelines.rst
+++ b/libcxx/docs/CodingGuidelines.rst
@@ -4,9 +4,6 @@
 libc++ Coding Guidelines
 ========================
 
-.. contents::
-  :local:
-
 Use ``__ugly_names`` for implementation details
 ===============================================
 
diff --git a/libcxx/docs/DesignDocs/CapturingConfigInfo.rst b/libcxx/docs/DesignDocs/CapturingConfigInfo.rst
index 402f4c7197c2f..0580beb71fc54 100644
--- a/libcxx/docs/DesignDocs/CapturingConfigInfo.rst
+++ b/libcxx/docs/DesignDocs/CapturingConfigInfo.rst
@@ -2,9 +2,6 @@
 Capturing configuration information in the headers
 ==================================================
 
-.. contents::
-   :local:
-
 The Problem
 ===========
 
diff --git a/libcxx/docs/DesignDocs/ExperimentalFeatures.rst b/libcxx/docs/DesignDocs/ExperimentalFeatures.rst
index f9b23493b2356..28399a50f490a 100644
--- a/libcxx/docs/DesignDocs/ExperimentalFeatures.rst
+++ b/libcxx/docs/DesignDocs/ExperimentalFeatures.rst
@@ -2,9 +2,6 @@
 Experimental Features
 =====================
 
-.. contents::
-   :local:
-
 .. _experimental features:
 
 Overview
diff --git a/libcxx/docs/DesignDocs/ExtendedCXX03Support.rst b/libcxx/docs/DesignDocs/ExtendedCXX03Support.rst
index 42d59db2bb7a4..5dc4078c862ab 100644
--- a/libcxx/docs/DesignDocs/ExtendedCXX03Support.rst
+++ b/libcxx/docs/DesignDocs/ExtendedCXX03Support.rst
@@ -2,9 +2,6 @@
 Extended C++03 Support
 =======================
 
-.. contents::
-   :local:
-
 Overview
 ========
 
diff --git a/libcxx/docs/DesignDocs/FeatureTestMacros.rst b/libcxx/docs/DesignDocs/FeatureTestMacros.rst
index fc3a4e355d6a0..f7130d5f6324c 100644
--- a/libcxx/docs/DesignDocs/FeatureTestMacros.rst
+++ b/libcxx/docs/DesignDocs/FeatureTestMacros.rst
@@ -2,9 +2,6 @@
 Feature Test Macros
 ===================
 
-.. contents::
-   :local:
-
 Overview
 ========
 
diff --git a/libcxx/docs/DesignDocs/FileTimeType.rst b/libcxx/docs/DesignDocs/FileTimeType.rst
index 946c9e515fb9b..7f0c7f93c0e47 100644
--- a/libcxx/docs/DesignDocs/FileTimeType.rst
+++ b/libcxx/docs/DesignDocs/FileTimeType.rst
@@ -2,9 +2,6 @@
 File Time Type
 ==============
 
-.. contents::
-   :local:
-
 .. _file-time-type-motivation:
 
 Motivation
diff --git a/libcxx/docs/DesignDocs/ThreadingSupportAPI.rst b/libcxx/docs/DesignDocs/ThreadingSupportAPI.rst
index d103c49e25952..3c54fe71ae09e 100644
--- a/libcxx/docs/DesignDocs/ThreadingSupportAPI.rst
+++ b/libcxx/docs/DesignDocs/ThreadingSupportAPI.rst
@@ -2,9 +2,6 @@
 Threading Support API
 =====================
 
-.. contents::
-   :local:
-
 Overview
 ========
 
diff --git a/libcxx/docs/DesignDocs/VisibilityMacros.rst b/libcxx/docs/DesignDocs/VisibilityMacros.rst
index db54b35386b19..83feb90f5f5c5 100644
--- a/libcxx/docs/DesignDocs/VisibilityMacros.rst
+++ b/libcxx/docs/DesignDocs/VisibilityMacros.rst
@@ -2,9 +2,6 @@
 Symbol Visibility Macros
 ========================
 
-.. contents::
-   :local:
-
 .. _visibility-macros:
 
 Overview
diff --git a/libcxx/docs/Hardening.rst b/libcxx/docs/Hardening.rst
index 8178a25e82648..896dcff2561d6 100644
--- a/libcxx/docs/Hardening.rst
+++ b/libcxx/docs/Hardening.rst
@@ -4,9 +4,6 @@
 Hardening Modes
 ===============
 
-.. contents::
-   :local:
-
 .. _using-hardening-modes:
 
 Using hardening modes
diff --git a/libcxx/docs/Helpers/ReleaseNotesTemplate.rst b/libcxx/docs/Helpers/ReleaseNotesTemplate.rst
index 395a5378b7105..2b4ec5bbafa98 100644
--- a/libcxx/docs/Helpers/ReleaseNotesTemplate.rst
+++ b/libcxx/docs/Helpers/ReleaseNotesTemplate.rst
@@ -2,10 +2,6 @@
 Libc++ XX.YY.ZZ (In-Progress) Release Notes
 ===========================================
 
-.. contents::
-   :local:
-   :depth: 2
-
 Written by the `Libc++ Team <https://libcxx.llvm.org>`_
 
 .. warning::
diff --git a/libcxx/docs/ReleaseNotes/20.rst b/libcxx/docs/ReleaseNotes/20.rst
index 572d4321dc46f..edbfc031350b5 100644
--- a/libcxx/docs/ReleaseNotes/20.rst
+++ b/libcxx/docs/ReleaseNotes/20.rst
@@ -2,10 +2,6 @@
 Libc++ 20.0.0 (In-Progress) Release Notes
 ===========================================
 
-.. contents::
-   :local:
-   :depth: 2
-
 Written by the `Libc++ Team <https://libcxx.llvm.org>`_
 
 .. warning::
diff --git a/libcxx/docs/ReleaseNotes/21.rst b/libcxx/docs/ReleaseNotes/21.rst
index 2b1aa28b62090..7d45bd97885ea 100644
--- a/libcxx/docs/ReleaseNotes/21.rst
+++ b/libcxx/docs/ReleaseNotes/21.rst
@@ -2,10 +2,6 @@
 Libc++ 21.0.0 (In-Progress) Release Notes
 ===========================================
 
-.. contents::
-   :local:
-   :depth: 2
-
 Written by the `Libc++ Team <https://libcxx.llvm.org>`_
 
 .. warning::
diff --git a/libcxx/docs/ReleaseNotes/22.rst b/libcxx/docs/ReleaseNotes/22.rst
index 9f9927095a61f..40fcc9bd826fe 100644
--- a/libcxx/docs/ReleaseNotes/22.rst
+++ b/libcxx/docs/ReleaseNotes/22.rst
@@ -2,10 +2,6 @@
 Libc++ 22.0.0 (In-Progress) Release Notes
 ===========================================
 
-.. contents::
-   :local:
-   :depth: 2
-
 Written by the `Libc++ Team <https://libcxx.llvm.org>`_
 
 .. warning::
diff --git a/libcxx/docs/ReleaseNotes/23.rst b/libcxx/docs/ReleaseNotes/23.rst
index f7a8e5b04f1ea..6aa1cfc46a524 100644
--- a/libcxx/docs/ReleaseNotes/23.rst
+++ b/libcxx/docs/ReleaseNotes/23.rst
@@ -2,10 +2,6 @@
 Libc++ 23.0.0 (In-Progress) Release Notes
 ===========================================
 
-.. contents::
-   :local:
-   :depth: 2
-
 Written by the `Libc++ Team <https://libcxx.llvm.org>`_
 
 .. warning::
diff --git a/libcxx/docs/ReleaseNotes/24.rst b/libcxx/docs/ReleaseNotes/24.rst
index a7b9e8731d555..a5a99d0aa9dbc 100644
--- a/libcxx/docs/ReleaseNotes/24.rst
+++ b/libcxx/docs/ReleaseNotes/24.rst
@@ -2,10 +2,6 @@
 Libc++ 24.0.0 Release Notes
 ===========================
 
-.. contents::
-   :local:
-   :depth: 2
-
 Written by the `Libc++ Team <https://libcxx.llvm.org>`_
 
 .. warning::
diff --git a/libcxx/docs/Status/Cxx29.md b/libcxx/docs/Status/Cxx29.md
index 5c89e4c9062a8..78a59ae8874e3 100644
--- a/libcxx/docs/Status/Cxx29.md
+++ b/libcxx/docs/Status/Cxx29.md
@@ -5,9 +5,6 @@
 ```{include} ../Helpers/Styles.md
 ```
 
-```{contents}
-:local: true
-```
 
 ## Overview
 
diff --git a/libcxx/docs/TestingLibcxx.rst b/libcxx/docs/TestingLibcxx.rst
index 8b902518a204b..0dd5af8bd8e78 100644
--- a/libcxx/docs/TestingLibcxx.rst
+++ b/libcxx/docs/TestingLibcxx.rst
@@ -4,9 +4,6 @@
 Testing libc++
 ==============
 
-.. contents::
-  :local:
-
 Getting Started
 ===============
 
diff --git a/libcxx/docs/UserDocumentation.rst b/libcxx/docs/UserDocumentation.rst
index 415a599168374..59c2362cac634 100644
--- a/libcxx/docs/UserDocumentation.rst
+++ b/libcxx/docs/UserDocumentation.rst
@@ -4,9 +4,6 @@
 User documentation
 ==================
 
-.. contents::
-  :local:
-
 This page contains information for users of libc++: how to use libc++ if it is not
 the default library used by the toolchain, and what configuration knobs are available
 if libc++ is used by the toolchain. This page is aimed at users of libc++, whereas a
diff --git a/libcxx/docs/VendorDocumentation.rst b/libcxx/docs/VendorDocumentation.rst
index 38fd5ac73e222..16581479b9dd3 100644
--- a/libcxx/docs/VendorDocumentation.rst
+++ b/libcxx/docs/VendorDocumentation.rst
@@ -4,9 +4,6 @@
 Vendor Documentation
 ====================
 
-.. contents::
-  :local:
-
 The instructions on this page are aimed at vendors who ship libc++ as part of an
 operating system distribution, a toolchain or similar shipping vehicles. If you
 are a user merely trying to use libc++ in your program, you most likely want to
diff --git a/libcxx/docs/_static/custom.css b/libcxx/docs/_static/custom.css
new file mode 100644
index 0000000000000..504e0a61b3ba6
--- /dev/null
+++ b/libcxx/docs/_static/custom.css
@@ -0,0 +1,20 @@
+/* Use the full viewport on ordinary desktop displays, where Furo's fixed
+   content width leaves little room after both sidebars. Once the content area
+   reaches 90em (84em plus padding), grow symmetric outer margins instead. */
+ at media (min-width: 67em) {
+  .page .sidebar-drawer {
+    width: max(15em, calc(50% - 45em));
+  }
+
+  .main > .content {
+    width: min(84em, calc(100vw - 36em));
+  }
+}
+
+/* Furo moves the page-local TOC into a drawer below 82em, freeing its 15em
+   column for the main content. */
+ at media (min-width: 67em) and (max-width: 82em) {
+  .main > .content {
+    width: calc(100vw - 21em);
+  }
+}
diff --git a/libcxx/docs/conf.py b/libcxx/docs/conf.py
index eec5d344f42ce..9459f419f6799 100644
--- a/libcxx/docs/conf.py
+++ b/libcxx/docs/conf.py
@@ -82,22 +82,18 @@
 
 # -- Options for HTML output ---------------------------------------------------
 
-# The theme to use for HTML and HTML Help pages.  See the documentation for
-# a list of builtin themes.
-html_theme = "haiku"
-
-# Theme options are theme-specific and customize the look and feel of a theme
-# further.  For a list of options available for each theme, see the
-# documentation.
-# html_theme_options = {}
+configure_furo(
+    globals(),
+    source_directory="libcxx/docs/",
+    html_title="libc++",
+    html_logo=shared_static_asset("LLVMWyvernSmall.png"),
+    local_static_path=["_static"],
+    extra_css_files=["custom.css"],
+)
 
 # Add any paths that contain custom themes here, relative to this directory.
 # html_theme_path = []
 
-# The name for this set of Sphinx documents.  If None, it defaults to
-# "<project> v<release> documentation".
-# html_title = None
-
 # A shorter title for the navigation bar.  Default is the same as html_title.
 # html_short_title = None
 
@@ -110,11 +106,6 @@
 # pixels large.
 # html_favicon = None
 
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = []
-
 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
 # using the given strftime format.
 # html_last_updated_fmt = '%b %d, %Y'



More information about the llvm-branch-commits mailing list