Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 86770f2

Browse filesBrowse files
hugovkezio-melotti
andauthored
Use sphinxext-opengraph to generate OpenGraph metadata (#953)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
1 parent 7dcba58 commit 86770f2
Copy full SHA for 86770f2

File tree

Expand file treeCollapse file tree

3 files changed

+12
-0
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+12
-0
lines changed

‎_static/og-image.png

Copy file name to clipboard
47.3 KB
Loading

‎conf.py

Copy file name to clipboardExpand all lines: conf.py
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
'sphinx.ext.intersphinx',
1111
'sphinx.ext.todo',
1212
'sphinx_copybutton',
13+
'sphinxext.opengraph',
1314
'sphinxext.rediraffe',
1415
]
1516

@@ -105,6 +106,16 @@
105106

106107
todo_include_todos = True
107108

109+
# sphinxext-opengraph config
110+
ogp_site_url = "https://devguide.python.org/"
111+
ogp_site_name = "Python Developer's Guide"
112+
ogp_image = "_static/og-image.png"
113+
ogp_custom_meta_tags = [
114+
'<meta property="og:image:width" content="1200">',
115+
'<meta property="og:image:height" content="630">',
116+
'<meta name="theme-color" content="#3776ab" />',
117+
]
118+
108119
# Strip the dollar prompt when copying code
109120
# https://sphinx-copybutton.readthedocs.io/en/latest/use.html#strip-and-configure-input-prompts-for-code-cells
110121
copybutton_prompt_text = "$"

‎requirements.txt

Copy file name to clipboardExpand all lines: requirements.txt
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ Sphinx==5.3.0
22
furo>=2022.6.4
33
sphinx_copybutton>=0.3.3
44
sphinx-lint==0.6.7
5+
sphinxext-opengraph>=0.7.1
56
sphinxext-rediraffe

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.