From 42446e1a9b08c1941fd1f9f09b69d8644f5c3aa9 Mon Sep 17 00:00:00 2001 From: Guillaume Ayoub Date: Fri, 15 Nov 2024 15:13:15 +0100 Subject: [PATCH] Use Furo theme for documentation --- docs/conf.py | 21 ++++++++++++++++++--- docs/index.rst | 4 ++-- pyproject.toml | 2 +- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 7f1a22c..1d0ffc8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -46,10 +46,25 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'sphinx_rtd_theme' +html_theme = 'furo' html_theme_options = { - 'collapse_navigation': False, + 'light_css_variables': { + 'color-brand-primary': 'var(--red)', + 'color-brand-content': 'var(--red)', + 'color-brand-visited': 'var(--red)', + 'font-stack': 'ClarityCity, sans-serif', + 'font-stack--monospace': 'Inconsolata, monospace', + 'font-stack--headings': 'Inconsolata, monospace', + }, + 'dark_css_variables': { + 'color-brand-primary': 'var(--red)', + 'color-brand-content': 'var(--red)', + 'color-brand-visited': 'var(--red)', + }, + 'top_of_page_buttons': ['edit'], + 'source_edit_link': + 'https://github.com/CourtBouillon/pydyf/edit/main/docs/{filename}', } # Favicon URL @@ -63,7 +78,7 @@ # These paths are either relative to html_static_path # or fully qualified paths (eg. https://...) html_css_files = [ - 'https://www.courtbouillon.org/static/docs.css', + 'https://www.courtbouillon.org/static/docs-furo.css', ] # Output file base name for HTML help builder. diff --git a/docs/index.rst b/docs/index.rst index bb8ea3f..0c2a4fb 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -7,7 +7,7 @@ tinycss2 .. toctree:: :caption: Documentation - :maxdepth: 3 + :maxdepth: 2 first_steps common_use_cases @@ -16,7 +16,7 @@ tinycss2 .. toctree:: :caption: Extra Information - :maxdepth: 3 + :maxdepth: 2 changelog contribute diff --git a/pyproject.toml b/pyproject.toml index d1ef18c..4e07836 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,7 +40,7 @@ Changelog = 'https://github.com/Kozea/tinycss2/releases' Donation = 'https://opencollective.com/courtbouillon' [project.optional-dependencies] -doc = ['sphinx', 'sphinx_rtd_theme'] +doc = ['sphinx', 'furo'] test = ['pytest', 'ruff'] [tool.flit.sdist]