Skip to content
Merged
Binary file added _static/og-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx_copybutton',
'sphinxext.opengraph',
'sphinxext.rediraffe',
]

Expand Down Expand Up @@ -104,6 +105,16 @@

todo_include_todos = True

# sphinxext-opengraph config
ogp_site_url = "https://devguide.python.org/"
Comment thread
hugovk marked this conversation as resolved.
Resolved
ogp_site_name = "Python Developer's Guide"
ogp_image = "_static/og-image.png"
ogp_custom_meta_tags = [
'<meta property="og:image:width" content="1200">',
'<meta property="og:image:height" content="630">',
'<meta name="theme-color" content="#3776ab" />',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I looked into using a gradient that matches both colors of the Python logo, but this doesn't seem supported.

]

# Strip the dollar prompt when copying code
# https://sphinx-copybutton.readthedocs.io/en/latest/use.html#strip-and-configure-input-prompts-for-code-cells
copybutton_prompt_text = "$"
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ Sphinx==5.3.0
furo>=2022.6.4
sphinx_copybutton>=0.3.3
sphinx-lint==0.6.7
sphinxext-opengraph>=0.7.1
sphinxext-rediraffe