-
-
Notifications
You must be signed in to change notification settings - Fork 877
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
Changes from 1 commit
508bd4c
9f323a9
659a6c3
3a4f655
7e8173d
b919f6c
d186e52
3b2e688
5b048ea
edd71a7
d3c69f7
684dff2
e47cc4f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
'sphinx.ext.intersphinx', | ||
'sphinx.ext.todo', | ||
'sphinx_copybutton', | ||
'sphinxext.opengraph', | ||
'sphinxext.rediraffe', | ||
] | ||
|
||
|
@@ -97,3 +98,7 @@ | |
} | ||
|
||
todo_include_todos = True | ||
|
||
# sphinxext-opengraph config | ||
ogp_site_url = "https://devguide.python.org/" | ||
ogp_image = "https://devguide.python.org/_static/python-logo.svg" | ||
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. Apparently SVGs are not supported, so we should use a different image. Should we also add more variables? 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. Will find another image. The recommended image size is 1200 x 630, should we use a Python logo or something else? I don't think we need any of the other variables. 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. Re: other variables: I'll check 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.
We can use 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.
Since the image is rectangular (and somewhat big), it would be nice if it had both the Python logo and the text "Devguide". If/when we do the same for This however would require creating new images, so if you don't want to do that, just a simple logo will do (we can always update the image later).
ok
Right, it would be better if the description was created dynamically. 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. SVG replaced with a PNG of the Python logo + "Devguide". I wrote a script to create it (hugovk/pixel-tools#15), so we can re-use that for other repos if we want. I also squashed out the extra bytes from the PNG using When temporarily setting Also included 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. The new image looks good -- I wonder if we can use the same font used with the logo though. https://www.python.org/community/logos/ says
Further down on the same page it says:
So we should ask there first, and if they agree we can regenerate the logos with the right font. This is not a blocker by any means though, so we can merge with the current image and recreate it later. 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. It's taking a while to get the font. It would be nice to get this merged to see how it works when live. Shall we merge this as-is, or with the image removed? 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. Let's merge it. 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. (Continued in main thread: #953 (comment)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ Sphinx==5.2.1 | |
furo>=2022.6.4 | ||
sphinx_copybutton>=0.3.3 | ||
sphinx-lint<1 | ||
sphinxext-opengraph | ||
sphinxext-rediraffe |
Uh oh!
There was an error while loading. Please reload this page.