From: Daniele Varrazzo Date: Wed, 25 Nov 2020 23:30:36 +0000 (+0000) Subject: Take docs announcement out of repos X-Git-Tag: 3.0.dev0~308^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14%2Fhead;p=thirdparty%2Fpsycopg.git Take docs announcement out of repos Moved to the website. --- diff --git a/docs/_static/psycopg-48.png b/docs/_static/psycopg-48.png deleted file mode 100644 index 667d20073..000000000 Binary files a/docs/_static/psycopg-48.png and /dev/null differ diff --git a/docs/conf.py b/docs/conf.py index f885ba486..2a8973f07 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,7 +17,8 @@ import sys from pathlib import Path -sys.path.append(str(Path(__file__).parent / "lib")) +docs_dir = Path(__file__).parent +sys.path.append(str(docs_dir / "lib")) # -- Project information ----------------------------------------------------- @@ -52,6 +53,14 @@ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".venv"] # -- Options for HTML output ------------------------------------------------- +# The announcement may be in the website but not shipped with the docs +ann_file = docs_dir / "../../templates/docs3-announcement.html" +if ann_file.exists(): + with ann_file.open() as f: + announcement = f.read() +else: + announcement = "" + html_css_files = ["psycopg.css"] # The name of the Pygments (syntax highlighting) style to use. @@ -59,17 +68,10 @@ pygments_style = "friendly" # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -# html_theme = "furo" html_show_sphinx = False html_theme_options = { - "announcement": """ - - - Sponsor psycopg3 on GitHub - - """, + "announcement": announcement, "sidebar_hide_name": False, "light_logo": "psycopg-100.png", "dark_logo": "psycopg-100.png",