You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think we should add them manually, but use an extension to automate the creation instead.
sphinxext-opengraph already does this for OGP meta tags (including automatically setting the title and description), but apparently not for regular meta tags. I haven't checked yet if there are other extensions that can add those, if not, we can create one similar to sphinxext-opengraph or make a PR against it to add this feature (if they are interested).
sphinxext-opengraph already does this for OGP meta tags (including automatically setting the title and description), but apparently not for regular meta tags. I haven't checked yet if there are other extensions that can add those, if not, we can create one similar to sphinxext-opengraph or make a PR against it to add this feature (if they are interested).
<metaproperty="og:title" content="The initialization of the sys.path module search path" /><metaproperty="og:type" content="website" /><metaproperty="og:url" content="https://docs.python.org/3/library/sys_path_init.html" /><metaproperty="og:site_name" content="Python documentation" /><metaproperty="og:description" content="A module search path is initialized when Python starts. This module search path may be accessed at sys.path. The first entry in the module search path is the directory that contains the input scrip..." /><metaproperty="og:image" content="https://docs.python.org/3/_static/og-image.png" /><metaproperty="og:image:alt" content="Python documentation" /><metaname="description" content="A module search path is initialized when Python starts. This module search path may be accessed at sys.path. The first entry in the module search path is the directory that contains the input scrip..." /><metaproperty="og:image:width" content="200" /><metaproperty="og:image:height" content="200" />
Activity
Mariatta commentedon Oct 5, 2022
I think this is where we could get expert advice on what to write inside the title and description meta tags.
ezio-melotti commentedon Oct 6, 2022
I don't think we should add them manually, but use an extension to automate the creation instead.
sphinxext-opengraphalready does this for OGP meta tags (including automatically setting the title and description), but apparently not for regular meta tags. I haven't checked yet if there are other extensions that can add those, if not, we can create one similar tosphinxext-opengraphor make a PR against it to add this feature (if they are interested).See also:
hugovk commentedon Oct 6, 2022
They're interested, there's a feature request to add
<meta name="description">: sphinx-doc/sphinxext-opengraph#65).Mariatta commentedon Oct 6, 2022
The extension looks interesting. Looking at the comments, it seems like we can probably use the
ogp_custom_meta_tags?hugovk commentedon Oct 18, 2022
We can't use
ogp_custom_meta_tagsbecause they would be hardcoded for all pages, and we'd like them generated for each page.I've created a PR for this: sphinx-doc/sphinxext-opengraph#71.
hugovk commentedon Aug 4, 2023
Description meta tags have now been added by python/cpython#99931.
For example, https://docs.python.org/3/library/sys_path_init.html has:
See also #63 (comment).
StanFromIreland commentedon Feb 24, 2025
The auto generation is not the best:
Maybe this should be revisited? Adding them manually for key pages?
hugovk commentedon Feb 24, 2025
The frontpage itself is a template page, and therefore sphinxext-opengraph doesn't generate tags for it.
So yes, we should manually add tags for that page. Would you like to open a new issue for it?
For comparison, here's one that is generated:
StanFromIreland commentedon Feb 24, 2025
Where to open it? Here or cpython? I can push a pr with the tags.