Skip to content

Commit 0175610

Browse files
committed
docs: add sphinx opengraph extension
1 parent a85b106 commit 0175610

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ myst-parser
1010
pydata-sphinx-theme
1111
sphinx-autobuild
1212
sphinx-copybutton
13+
sphinxext-opengraph
1314
sphinxext-rediraffe

docs/source/conf.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"sphinx_copybutton",
3333
"sphinx.ext.autodoc",
3434
"sphinx.ext.napoleon",
35+
"sphinxext.opengraph",
3536
"sphinxext.rediraffe",
3637
]
3738
root_doc = "index"
@@ -80,6 +81,18 @@
8081
]
8182

8283

84+
# -- Options for the opengraph extension -------------------------------------
85+
# ref: https://github.com/wpilibsuite/sphinxext-opengraph#options
86+
#
87+
# This extension help others provide better thumbnails and link descriptions
88+
# when they link to this documentation from other websites, such as
89+
# https://discourse.jupyter.org.
90+
#
91+
# ogp_site_url is set automatically by RTD
92+
ogp_image = "_static/images/logo.png"
93+
ogp_use_first_image = True
94+
95+
8396
# -- Options for the rediraffe extension -------------------------------------
8497
# ref: https://github.com/wpilibsuite/sphinxext-rediraffe#readme
8598
#

0 commit comments

Comments
 (0)