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

Docs: remove "Canonical URLs" guide #11516

Merged
merged 1 commit into from
Aug 12, 2024
Merged

Conversation

humitos
Copy link
Member

@humitos humitos commented Aug 6, 2024

This guide is pretty old and it's not correct anymore. Besides, we are now mentioning $READTHEDOCS_CANONICAL_URL environment variable in the https://docs.readthedocs.io/en/stable/canonical-urls.html.

We should create a redirect from the page deleted to that one where we are already mentioning how to configure Sphinx and MkDocs.

Closes #10246


📚 Documentation previews 📚

This guide is pretty old and it's not correct anymore.
Besides, we are now mentioning `$READTHEDOCS_CANONICAL_URL` environment variable
in the https://docs.readthedocs.io/en/stable/canonical-urls.html.

We should create a redirect from the page deleted to that one where we are
already mentioning how to configure Sphinx and MkDocs.

Closes #10246
@humitos humitos requested a review from a team as a code owner August 6, 2024 15:37
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like useful information about how to set this information in the specific tools. Now that we're supporting more tools, I guess this isn't as useful, but it does seem like having small guides about how this works on each tool is still useful to have?

We should at least copy over the code snippet that we put in the blog post (https://about.readthedocs.com/blog/2024/07/addons-by-default/) in the Canonical URL docs or similar

Comment on lines -15 to -22
If you are using a custom ``html_baseurl`` in your ``conf.py``,
you have to ensure that the value is correct.
This can be complex,
supporting pull request builds (which are published on a separate domain),
special branches
or if you are using :term:`subproject` s or :doc:`translations </localization>`.
We recommend not including a ``html_baseurl`` in your ``conf.py``,
and letting Read the Docs define it.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does our current guide explain how to do this effectively? I don't think we really need to set canonical URLs in PR builds though, since they are disallowed by robots.txt.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the effectively way of doing this? The current guide just mention that on Sphinx you can use html_baseurl and on MkDocs the site_url configs: https://docs.readthedocs.io/en/stable/canonical-urls.html#how-to-specify-the-canonical-url

Setting these for specific tools should be done in different pages. See my other comment: #11516 (comment)

@humitos
Copy link
Member Author

humitos commented Aug 6, 2024

does seem like having small guides about how this works on each tool is still useful to have?

I think we definitely want a per tool guide to set all of these things. We are tracking that work in #11187

@humitos
Copy link
Member Author

humitos commented Aug 6, 2024

I think this page currently adds more confusion that help since most of its content is not valid anymore; that's why I'm proposing to delete it for now and work directly on the other issues we have open for per-doc tool integration guides.

@ericholscher
Copy link
Member

Yea, it just seems like a shame to lose the information that's still useful from this guide. It seems like it should be moved over to the Canonical URL page for now?

@humitos
Copy link
Member Author

humitos commented Aug 7, 2024

I don't follow you here. What's exactly the useful information from this page you refer to? Can you share the link to it?

@ericholscher
Copy link
Member

I think the note about how to set the canonical URL for each tool, and the links to the docs for them, along with the code example from the blog post I linked?

I guess I'm fine just removing these for now, but since we're removing automatically setting the canonical URL, it seems like our docs should have explicit examples for how to set them in the tools previously supported?

@humitos humitos merged commit 1b14f65 into main Aug 12, 2024
9 checks passed
@humitos humitos deleted the humitos/canonical-urls-guide-removed branch August 12, 2024 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: Mention $READTHEDOCS_CANONICAL_URL
2 participants