Switch the libc documentation site from the alabaster theme to Furo,
which provides mobile-friendly layout, a collapsible sidebar with
caption-based section grouping, and built-in "Edit this page" links.
Changes by area:
conf.py
- Switch html_theme to "furo"
- Add myst_parser extension (already in llvm/docs/requirements.txt, used
by LLDB/Clang/LLVM docs) to allow Markdown alongside RST
- Accept both .rst and .md source suffixes
- Configure Furo source_repository/source_branch/source_directory for
"Edit this page" links pointing to GitHub
- Wire _static/copybutton.{js,css} for copy-to-clipboard buttons on code
blocks (no new pip dependency; can migrate to sphinx-copybutton later
once it's in requirements-hashed.txt)
- Exclude plan-docs.md and Helpers/ from Sphinx processing
index.rst
- Rewrite landing page: remove apologetic "not fully complete" note, add
"What Works Today" section with concrete supported use cases, honest
caveat that full C stdlib coverage is still in progress
- Restructure hidden toctrees into five captioned sidebar groups: "Using
LLVM-libc", "Platforms" (GPU/UEFI promoted to top-level),
"Implementation Status", "Development", "Links"
New files
- docs/_static/copybutton.{js,css}: lightweight copy button for code
blocks
- docs/_static/custom.css: add status badge styles (.badge-complete
etc.) for use with Helpers/Styles.rst substitutions in later phases
Prepare for future status badges:
- docs/Helpers/Styles.rst: RST substitution definitions for status
badges (|Complete|, |Partial|, |InProgress|, |NotStarted|, |GPUOnly|,
|LinuxOnly|) — excluded from toctree, available for Phase 5+ pages
- docs/dev/building_docs.rst: new page covering prerequisites (with
Debian apt-first instructions), CMake flags, ninja docs-libc-html, the
docgen auto-generation pipeline, and troubleshooting
Removed
- docs/README.txt: stale file claiming Sphinx 1.1.3, not in any toctree;
superseded by docs/dev/building_docs.rst
Cleanups
- Remove redundant ".. contents:: Table of Contents" directives from 16
RST files (Furo renders its own per-page TOC in the sidebar)
- Remove same directive from libc/Maintainers.rst (pulled into docs via
include)
136 lines
2.4 KiB
CSS
136 lines
2.4 KiB
CSS
pre {
|
|
padding: 7px;
|
|
}
|
|
|
|
div.document {
|
|
width: 90%;
|
|
}
|
|
|
|
div.note {
|
|
padding: 20px 20px 10px 20px;
|
|
}
|
|
|
|
div.note p.admonition-title {
|
|
font-size: 130%;
|
|
}
|
|
|
|
table.mapping {
|
|
width: 100%;
|
|
}
|
|
|
|
table.mapping td {
|
|
width: 50%;
|
|
padding: 5px;
|
|
}
|
|
|
|
table.mapping td.hed {
|
|
background: #606060;
|
|
color: #fefefe;
|
|
text-align: left;
|
|
border-bottom: 2px #fefefe solid;
|
|
font-weight: bold;
|
|
}
|
|
|
|
table.mapping td.header {
|
|
background: #eeeeee;
|
|
}
|
|
|
|
table.mapping td.content {
|
|
font-family: monospace;
|
|
padding-bottom: 15px;
|
|
}
|
|
|
|
/* Workaround for a Safari bug that would otherwise make table cells less wide
|
|
than the containing text. This just sets it back to the default browser
|
|
property.*/
|
|
td {
|
|
-webkit-hyphens: manual !important;
|
|
}
|
|
|
|
div.sphinxsidebar .caption {
|
|
font-family: Helvetica, Verdana, sans-serif;
|
|
font-size: 10pt;
|
|
font-weight: bold;
|
|
color: #fefefe;
|
|
background: #606060;
|
|
margin-bottom: 0;
|
|
text-transform: uppercase;
|
|
padding: 7px;
|
|
}
|
|
|
|
div.sphinxsidebar a,
|
|
div.sphinxsidebar a:hover {
|
|
border: none;
|
|
}
|
|
|
|
div.sphinxsidebar li {
|
|
padding-left: 7px;
|
|
border-bottom: 1px solid #fefefe;
|
|
}
|
|
|
|
div.sphinxsidebar li:hover {
|
|
background: #ccddee;
|
|
}
|
|
|
|
div.sphinxsidebar ul {
|
|
background: #bbccdd;
|
|
margin: 0px;
|
|
padding: 0px;
|
|
}
|
|
|
|
div.sphinxsidebar ul a {
|
|
font-family: Helvetica, Verdana, sans-serif;
|
|
font-size: 8pt;
|
|
display: block;
|
|
padding: 5px 0;
|
|
line-height: 14pt;
|
|
}
|
|
|
|
div.sphinxsidebar ul li.toctree-l1 > a {
|
|
font-size: 100%;
|
|
}
|
|
|
|
div.sphinxsidebar h3 {
|
|
/* Hide Navigation. */
|
|
display: none;
|
|
}
|
|
|
|
@media screen and (min-width: 875px) {
|
|
div.body {
|
|
max-width: 90%;
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: 875px) {
|
|
div.sphinxsidebar {
|
|
margin-left: 0px;
|
|
margin-right: 0px;
|
|
}
|
|
|
|
div.body {
|
|
min-width: auto;
|
|
max-width: auto;
|
|
}
|
|
}
|
|
|
|
/* ---------------------------------------------------------------------------
|
|
Status badges (used via Helpers/Styles.rst substitutions)
|
|
--------------------------------------------------------------------------- */
|
|
.badge {
|
|
display: inline-block;
|
|
padding: 0.15em 0.5em;
|
|
border-radius: 3px;
|
|
font-size: 0.8em;
|
|
font-weight: 600;
|
|
line-height: 1.4;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.badge-complete { background: #2ea44f; color: #fff; }
|
|
.badge-partial { background: #f0883e; color: #fff; }
|
|
.badge-inprogress { background: #0969da; color: #fff; }
|
|
.badge-notstarted { background: #6e7781; color: #fff; }
|
|
.badge-gpuonly { background: #8250df; color: #fff; }
|
|
.badge-linuxonly { background: #1a7f37; color: #fff; }
|
|
|