ansible / ansible-documentation

Ansible community documentation
https://docs.ansible.com/
GNU General Public License v3.0
83 stars 480 forks source link

Investigate discourse links for documentation #346

Open oraNod opened 1 year ago

oraNod commented 1 year ago

image

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

GregSutcliffe commented 1 year ago

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.

samccann commented 1 year ago

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?

webknjaz commented 1 year ago

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 commented 1 year ago

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

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

oraNod commented 1 year ago

Thanks @webknjaz

leogallego commented 12 months ago

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:

felixfontein commented 10 months ago

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?