From 83369fdf973002af75f0a682d701963dd5fe7b30 Mon Sep 17 00:00:00 2001 From: Becky Sweger Date: Fri, 11 Oct 2024 16:22:09 -0400 Subject: [PATCH] Add GitHub link and try to fix open graph cards --- docs/conf.py | 30 ++++++++++++++++++++---------- docs/index.rst | 7 ++++--- docs/reference/cladetime.rst | 2 ++ 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 640be57..6216190 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -78,14 +78,20 @@ "dark_logo": "cladetime_logo_dark_mode.png", "navigation_with_keys": True, "source_repository": "https://github.com/reichlab/cladetime/", -} - -html_context = { - # Enable the "Edit in GitHub link within the header of each page. - "display_github": True, - "github_user": "reichlab", - "github_repo": "cladetime", - "github_version": "main/source/", + # source for GitHub footer icon: + # https://pradyunsg.me/furo/customisation/footer/#using-embedded-svgs + "footer_icons": [ + { + "name": "GitHub", + "url": "https://github.com/reichlab/cladetime", + "html": """ + + + + """, + "class": "", + }, + ], } # from https://myst-parser.readthedocs.io/en/latest/syntax/optional.html @@ -101,10 +107,14 @@ ] # Open Graph metadata +ogp_site_url = "https://cladetime.readthedocs.io" ogp_title = "cladetime documentation" ogp_type = "website" -ogp_social_cards = {"image": "_static/cladetime_logo_light_mode.png", "line_color": "#F09837"} -ogp_description = "Cladetime is a Python interface for accessing Nextstraing Sars-Cov-2 sequence and clade data." +ogp_image = "https://cladetime.readthedocs.io/en/latest/_static/cladetime_logo_light_mode.png" +ogp_social_cards = { + "image": "https://cladetime.readthedocs.io/en/latest/_static/cladetime_logo_light_mode.png", + "line_color": "#5d9c9c", +} # Warn about all references to unknown targets nitpicky = True diff --git a/docs/index.rst b/docs/index.rst index 6d8ca7d..ce00f9d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,9 +1,10 @@ +:og:description: Cladetime is a Python interface for accessing Sars-Cov-2 sequence and clade data provided by Nextstrain. + =============== Cladetime =============== -Cladetime is a Python library for manipulating SARS-CoV-2 sequence and clade data provided by -`nextstrain.org `_. +Cladetime is a Python interface for accessing `Nextstrain `_ Sars-Cov-2 sequence and clade data. .. toctree:: :titlesonly: @@ -44,7 +45,7 @@ daily workflow pipeline. ... pl.col("host") == "Homo sapiens", ... ) ... .cast({"date": pl.Date}, strict=False) - ...) + ... ) >>> filtered_sequence_metadata.head(5).collect() diff --git a/docs/reference/cladetime.rst b/docs/reference/cladetime.rst index 612ae8a..eac6a67 100644 --- a/docs/reference/cladetime.rst +++ b/docs/reference/cladetime.rst @@ -1,3 +1,5 @@ +:og:description: Cladetime is a Python interface for accessing Sars-Cov-2 sequence and clade data provided by Nextstrain. + ========== CladeTime ==========