diff --git a/docs/requirements.txt b/docs/requirements.txt index 315a926f..bd71f28e 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -17,3 +17,4 @@ ruamel.yaml sphinx>=4 sphinx-copybutton sphinx-jsonschema +sphinxext-opengraph diff --git a/docs/source/conf.py b/docs/source/conf.py index 98aeb64b..f36304e6 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -34,6 +34,7 @@ extensions = [ "autodoc_traits", "sphinx_copybutton", "sphinx-jsonschema", + "sphinxext.opengraph", "myst_parser", ] root_doc = "index" @@ -192,3 +193,9 @@ intersphinx_mapping = { "python": ("https://docs.python.org/3/", None), "tornado": ("https://www.tornadoweb.org/en/stable/", None), } +# -- Options for the opengraph extension ------------------------------------- +# ref: https://github.com/wpilibsuite/sphinxext-opengraph#options +# +# ogp_site_url is set automatically by RTD +ogp_image = "_static/logo.png" +ogp_use_first_image = True