]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Fix #13 Use a responsive docs theme
authorPaolo Melchiorre <paolo@melchiorre.org>
Wed, 25 Nov 2020 16:00:41 +0000 (17:00 +0100)
committerPaolo Melchiorre <paolo@melchiorre.org>
Wed, 25 Nov 2020 16:00:41 +0000 (17:00 +0100)
.gitignore
docs/Makefile
docs/_static/psycopg-100.png [new file with mode: 0644]
docs/_static/psycopg-48.png [new file with mode: 0644]
docs/conf.py
docs/requirements.txt

index 1abeb25fe6421fb548211f4a22927e15d16dcc31..b8fb5f22d0375fae90bc53f4e55de6133f5c15fc 100644 (file)
@@ -7,3 +7,4 @@
 /.mypy_cache
 __pycache__/
 /docs/_build/
+/docs/.venv/
index 64011e35f73b32b2480246358ec7269bd3ed25c6..f6ffe8d118ac38f221382aab4af05eddcaa86184 100644 (file)
@@ -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 (file)
index 0000000..437724c
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 (file)
index 0000000..667d200
Binary files /dev/null and b/docs/_static/psycopg-48.png differ
index 11820ac096d3a479b540b9fbd2a2bc0defc4bf6e..d542a8d8452e1a08f37ab2b2a961849a18ba2d1c 100644 (file)
@@ -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": """
+        <a style=\"text-decoration: none; color: white;\" 
+           href=\"https://github.com/sponsors/dvarrazzo\">
+           <img height="24px" width="24px" src=\"_static/psycopg-48.png\"/> Sponsor psycopg3 on GitHub
+        </a>
+    """,
+    "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,
index b46c7a1558be70aa1b19e877e9b2ebd91a06fb6b..a6049581df1c62dbf3f06ea624ebc7d5449001f7 100644 (file)
@@ -1,3 +1,3 @@
 Sphinx >= 3.3, < 3.4
 docutils >= 0.16, < 0.17
-sphinx-better-theme >= 0.1.5, < 0.2
+furo