-
-
Notifications
You must be signed in to change notification settings - Fork 860
Use sphinxext-opengraph to generate OpenGraph metadata #953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
508bd4c
Use sphinxext-opengraph to generate OpenGraph metadata
hugovk 9f323a9
Merge branch 'main' into add-og-metadata
hugovk 659a6c3
Merge branch 'main' into add-og-metadata
ezio-melotti 3a4f655
Merge branch 'main' into add-og-metadata
ezio-melotti 7e8173d
Merge branch 'main' into add-og-metadata
hugovk b919f6c
Create logo+text PNG for og:image, SVG not supported
hugovk d186e52
Include og:image:width and height to ensure shares of new URLs includ…
hugovk 3b2e688
Include og:site_name, displayed for the overall site
hugovk 5b048ea
Use relative path for ogp_image
hugovk edd71a7
Use sphinxext-opengraph 0.7.1+ to use meta og:description as meta des…
hugovk d3c69f7
Merge branch 'main' into add-og-metadata
hugovk 684dff2
Add theme colour using Python blue
hugovk e47cc4f
Regenerate OG image with Flux Regular
hugovk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
'sphinx.ext.intersphinx', | ||
'sphinx.ext.todo', | ||
'sphinx_copybutton', | ||
'sphinxext.opengraph', | ||
'sphinxext.rediraffe', | ||
] | ||
|
||
|
@@ -104,6 +105,16 @@ | |
|
||
todo_include_todos = True | ||
|
||
# sphinxext-opengraph config | ||
ogp_site_url = "https://devguide.python.org/" | ||
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" />', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 = "$" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.