pydoctor icon indicating copy to clipboard operation
pydoctor copied to clipboard

Implement canonical HTML meta tag in the templates

Open adiroiban opened this issue 1 year ago • 2 comments

To help with search engines, I think that the pydoctor templates should use a canonical tag to point to the latest version

https://docs.readthedocs.io/en/latest/canonical-urls.html


With twisted we have this issue that when you search for twisted deferred API you get links like https://twisted.org/documents/10.1.0/api/twisted.internet.defer.Deferred.html

adiroiban avatar Jul 12 '22 09:07 adiroiban

Yes canonical urls is a good thing to have.

But also we should investigate the option of adding a « search in api docs » button from the readthedocs search bar.

tristanlatr avatar Jul 20 '22 21:07 tristanlatr

But also we should investigate the option of adding a « search in api docs » button from the readthedocs search bar.

I think that this can be done in 2 steps:

  1. Have pydoctor generate a dedicated search.html page that takes the search term from the URL. Search.html or api/index.html it doesn't matter. The important part to allow search input from the URL, not only via typing.

  2. Create a raw HTML element on any Sphinx page with a form field that will make a GET to that page.

adiroiban avatar Jul 20 '22 22:07 adiroiban