Skip to content
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

Implement canonical HTML meta tag in the templates #608

Open
adiroiban opened this issue Jul 12, 2022 · 2 comments
Open

Implement canonical HTML meta tag in the templates #608

adiroiban opened this issue Jul 12, 2022 · 2 comments

Comments

@adiroiban
Copy link
Member

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

@tristanlatr
Copy link
Contributor

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.

@adiroiban
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants