From 676e17af2083ed1633eb71a02feefc4288e937e3 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Sat, 21 Oct 2023 07:02:52 +0200 Subject: [PATCH] docs: nicer fixed font --- docs/_static/custom.css | 9 +++++++++ docs/conf.py | 14 +++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 docs/_static/custom.css diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 0000000..5fe1b86 --- /dev/null +++ b/docs/_static/custom.css @@ -0,0 +1,9 @@ +@font-face { + font-family: "BerkeleyMono"; + src: local("Berkeley Mono"), + url("https://assets.hynek.me/bm/BerkeleyMono-Regular.woff2") format("woff2"), + url("https://assets.hynek.me/bm/BerkeleyMono-Italic.woff2") format("woff2"), + url("https://assets.hynek.me/bm/BerkeleyMono-BoldItalic.woff2") format("woff2"), + url("https://assets.hynek.me/bm/BerkeleyMono-Bold.woff2") format("woff2"); + font-display: swap; +} diff --git a/docs/conf.py b/docs/conf.py index 7686d9d..2d71ef6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -70,9 +70,17 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = "furo" -# None of the options work, so we disable the button completely. -html_theme_options = {"top_of_page_button": None} -html_static_path = [] +html_theme_options = { + "light_css_variables": { + "font-stack--monospace": "BerkeleyMono, MonoLisa, ui-monospace, " + "SFMono-Regular, Menlo, Consolas, Liberation Mono, monospace", + }, + # None of the options work, so we disable the button completely. + "top_of_page_button": None, +} + +html_static_path = ["_static"] +html_css_files = ["custom.css"] htmlhelp_basename = "staminadoc"