ansible-documentation icon indicating copy to clipboard operation
ansible-documentation copied to clipboard

Investigate discourse links for documentation

Open oraNod opened this issue 2 years ago • 7 comments

image

Discourse does oneboxes for links on a single line, but for docs we get this ^

oraNod avatar Aug 30 '23 09:08 oraNod

That was my comment, thanks for relaying it @oraNod. To clarify, the onebox system needs OpenGraph tags to work - but this is also widely used by social media etc, so improving this should make our docs more linkable in many places.

GregSutcliffe avatar Aug 30 '23 09:08 GregSutcliffe

Just verified this occurs for all pages, not just collection pages (aka it's not just something for antsibull-docs). But that suggests to me that this is an issue with the ansible sphinx theme.

Note it doesn't work much better for the Ansible mkdocs theme either, but I'm wondering if we need to move/split this into mutliple issues on those other repos? Afaik there's nothing we can do in the ansible-documentation repo itself to solve this set of problems. @felixfontein @gotmax23 - thoughts? Am I misinterpreting the potential fixes here?

samccann avatar Sep 05 '23 19:09 samccann

this is an issue with the ansible sphinx theme.

Kinda, but it's not a bug, technically. It was just never implemented. FWIW adding OG meta tags should be rather straightforward.

OTOH, the existence of https://pypi.org/p/sphinxext-opengraph suggests that it should be solvable on the extension level. I haven't looked into the source code but I suppose it probably just extends the meta tag entries dynamically.

webknjaz avatar Sep 06 '23 00:09 webknjaz

FYI, these are the validators to use post-deployment:

  • https://cards-dev.twitter.com/validator
  • https://developers.facebook.com/tools/debug/

The FB one has a button for resetting the cache. Both seem to require logging in.

webknjaz avatar Sep 06 '23 00:09 webknjaz

Thanks @webknjaz

oraNod avatar Sep 13 '23 07:09 oraNod

As mentioned above, this affects practically all docs pages and impacts the forum and social networks.

Leaving another validator and generator (although the suggestion by @webknjaz seems to be the best option for the latter) that also works for multiple services is the following:

  • https://opengraph.dev/panel?url=https%3A%2F%2Fdocs.ansible.com

leogallego avatar Oct 24 '23 18:10 leogallego

How about simply using https://pypi.org/project/sphinxext-opengraph/, and add an option to antsibull-docs to generate per-page overrides for plugin/module/role docs?

felixfontein avatar Nov 28 '23 20:11 felixfontein