Skip to content

Commit 6760589

Browse files
Add Open Graph protocol support for documentation link previews
- Add sphinxext-opengraph dependency - Configure OGP with site URL, logo_square.png image, and metadata - Enables rich previews when sharing documentation links on Slack, Twitter, etc. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cea32da commit 6760589

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

docs/conf.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def setup(app):
116116
"sphinx.ext.intersphinx",
117117
"sphinx.ext.githubpages",
118118
"sphinx_multiversion",
119+
"sphinxext.opengraph",
119120
]
120121

121122
# Napoleon settings for Google-style docstrings
@@ -187,6 +188,13 @@ def setup(app):
187188
]
188189
}
189190

191+
# -- Open Graph protocol settings ----------------------------------------------
192+
193+
ogp_site_url = "https://laughingman7743.github.io/PyAthena/"
194+
ogp_image = "https://laughingman7743.github.io/PyAthena/_static/logo_square.png"
195+
ogp_description_length = 200
196+
ogp_type = "website"
197+
190198
# -- Sphinx-multiversion configuration ----------------------------------------
191199

192200
# Whitelist pattern for tags (semantic versioning: vX.Y.Z)

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ dev = [
7373
"pytest-dependency",
7474
"sphinx",
7575
"sphinx-multiversion",
76+
"sphinxext-opengraph",
7677
"furo",
7778
"types-python-dateutil",
7879
]

0 commit comments

Comments
 (0)