Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
6a5f30c
docs(style[toc,body]): refine right-panel TOC and body typography
tony Mar 14, 2026
b85cb5a
docs(style[toc,content]): flexible TOC width with inner-panel padding
tony Mar 14, 2026
a412604
docs(style[toc]): increase TOC font size from 81.25% to 87.5%
tony Mar 14, 2026
693a880
docs(style[headings]): refine heading hierarchy — scale, spacing, eye…
tony Mar 14, 2026
9c45202
docs(fonts): self-host IBM Plex via Fontsource CDN
tony Mar 14, 2026
98d2e0f
docs(fonts[css]): fix variable specificity — use body instead of :root
tony Mar 14, 2026
2c560c4
docs(fonts[preload]): add <link rel="preload"> for critical font weights
tony Mar 14, 2026
b9e8b6f
docs(fonts[css]): add kerning, ligatures, and code rendering overrides
tony Mar 14, 2026
f83b0cb
docs(images[cls]): prevent layout shift and add non-blocking loading
tony Mar 14, 2026
b3a0481
docs(nav[spa]): add SPA-like navigation to avoid full page reloads
tony Mar 14, 2026
ccab059
docs(fonts[fallback]): add fallback font metrics to eliminate FOUT re…
tony Mar 14, 2026
36ead8f
docs(images[badges]): add placeholder sizing for external badge images
tony Mar 14, 2026
c67cb99
docs(sidebar[projects]): prevent active link flash with visibility gate
tony Mar 14, 2026
006a281
docs(nav[spa]): wrap DOM swap in View Transitions API for smooth cros…
tony Mar 14, 2026
7fede09
docs(css[structure]): move view transitions section after image rules
tony Mar 14, 2026
0fa6520
docs(fonts[loading]): switch to font-display block with inline CSS
tony Mar 14, 2026
f128bf2
docs(fonts[lint]): add docstrings to sphinx_fonts extension
tony Mar 14, 2026
09b5b2f
test(docs[sphinx_fonts]): add tests for sphinx_fonts extension
tony Mar 14, 2026
5d37f93
test(docs[sphinx_fonts]): fix ruff lint errors in test_sphinx_fonts
tony Mar 14, 2026
2e5f1ad
test(docs[sphinx_fonts]): apply ruff format to test_sphinx_fonts
tony Mar 14, 2026
2f458a7
test(docs[sphinx_fonts]): fix mypy errors in test_sphinx_fonts
tony Mar 14, 2026
8def325
pyproject(mypy): add sphinx_fonts to ignore_missing_imports
tony Mar 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs(fonts[lint]): add docstrings to sphinx_fonts extension
why: ruff D101/D103 rules flag missing docstrings on SetupDict
and setup(), causing CI lint failures in repos that lint docs/_ext/.
what:
- Add docstring to SetupDict TypedDict class
- Add docstring to setup() function
  • Loading branch information
tony committed Mar 14, 2026
commit f128bf277367918fe625ebf5c1f53d8e6e335410
3 changes: 3 additions & 0 deletions docs/_ext/sphinx_fonts.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@


class SetupDict(t.TypedDict):
"""Return type for Sphinx extension setup()."""

version: str
parallel_read_safe: bool
parallel_write_safe: bool
Expand Down Expand Up @@ -137,6 +139,7 @@ def _on_html_page_context(


def setup(app: Sphinx) -> SetupDict:
"""Register config values, events, and return extension metadata."""
app.add_config_value("sphinx_fonts", [], "html")
app.add_config_value("sphinx_font_fallbacks", [], "html")
app.add_config_value("sphinx_font_css_variables", {}, "html")
Expand Down