Skip to content

Commit 967c0e2

Browse files
Add OpenGraph metadata for better social sharing previews, check preview image once online! (otherwise need to change to png instead of svg
1 parent 13cc69b commit 967c0e2

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

doc/conf.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,14 @@
102102

103103
html_baseurl = 'https://contrib.scikit-learn.org/skglm/'
104104

105+
extensions.append("sphinxext.opengraph")
106+
107+
# OpenGraph config
108+
ogp_site_url = html_baseurl
109+
ogp_image = "https://contrib.scikit-learn.org/skglm/_static/images/logo.svg"
110+
ogp_description_length = 250
111+
ogp_type = "website"
112+
105113

106114
# -- Options for HTML output ----------------------------------------------
107115

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ doc = [
6767
"lifelines",
6868
"pydata_sphinx_theme",
6969
"sphinx-sitemap",
70+
"sphinxext-opengraph",
7071
]
7172

7273

0 commit comments

Comments
 (0)