From: Paolo Melchiorre Date: Wed, 25 Nov 2020 16:00:41 +0000 (+0100) Subject: Fix #13 Use a responsive docs theme X-Git-Tag: 3.0.dev0~308^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a71e9c3ae36613d2a4c68fb78ceee6b15781250;p=thirdparty%2Fpsycopg.git Fix #13 Use a responsive docs theme --- diff --git a/.gitignore b/.gitignore index 1abeb25fe..b8fb5f22d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /.mypy_cache __pycache__/ /docs/_build/ +/docs/.venv/ diff --git a/docs/Makefile b/docs/Makefile index 64011e35f..f6ffe8d11 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -18,7 +18,7 @@ help: env: .venv .venv: requirements.txt - virtualenv -p $(PYTHON) .venv + $(PYTHON) -m venv .venv ./.venv/bin/pip install -e ../psycopg3 ./.venv/bin/pip install -r requirements.txt diff --git a/docs/_static/psycopg-100.png b/docs/_static/psycopg-100.png new file mode 100644 index 000000000..437724cf3 Binary files /dev/null and b/docs/_static/psycopg-100.png differ diff --git a/docs/_static/psycopg-48.png b/docs/_static/psycopg-48.png new file mode 100644 index 000000000..667d20073 Binary files /dev/null and b/docs/_static/psycopg-48.png differ diff --git a/docs/conf.py b/docs/conf.py index 11820ac09..d542a8d84 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,8 +17,6 @@ import sys from pathlib import Path -from better import better_theme_path # type: ignore - sys.path.append(str(Path(__file__).parent / "lib")) @@ -54,15 +52,24 @@ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".venv"] # -- Options for HTML output ------------------------------------------------- +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = "friendly" + # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = "better" -html_theme_path = [better_theme_path] +html_theme = "furo" html_show_sphinx = False html_theme_options = { - "linktotheme": False, - "cssfiles": ["_static/psycopg.css"], + "announcement": """ + + Sponsor psycopg3 on GitHub + + """, + "sidebar_hide_name": True, + "light_logo": "psycopg-100.png", + "dark_logo": "psycopg-100.png", } # Add any paths that contain custom static files (such as style sheets) here, diff --git a/docs/requirements.txt b/docs/requirements.txt index b46c7a155..a6049581d 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,3 @@ Sphinx >= 3.3, < 3.4 docutils >= 0.16, < 0.17 -sphinx-better-theme >= 0.1.5, < 0.2 +furo