Skip to content

Improve documentation links #218

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

Merged
merged 2 commits into from
Apr 15, 2022
Merged

Improve documentation links #218

merged 2 commits into from
Apr 15, 2022

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Apr 13, 2022

  • Update links that were relying on redirects
  • Configure links to allow localization where available

per1234 added 2 commits April 12, 2022 12:11
github.com and wikipedia.org have different localization behaviors depending on the URL.

If a language code is specified via the URL, then that language version of the page is loaded, regardless of the
language setting of the user's browser or GitHub. For example, this URL will take the user to the English version of the
page even if their browser is configured for Chinese:

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github

If no language code is specified via the URL, then it redirects to the version of the page localized for the user's
language preference, where available. For example, if the user has selected "Chinese" as their preferred language in
their browser settings, then this URL:

https://docs.github.com/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github

redirects to:

https://docs.github.com/cn/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-on-github
Even though these links were still reaching the intended page, it is best not to rely on redirects continuing to work
indefinitely.
@per1234 per1234 added topic: documentation Related to documentation for the project type: enhancement Proposed improvement labels Apr 13, 2022
@per1234 per1234 self-assigned this Apr 13, 2022
@per1234
Copy link
Contributor Author

per1234 commented Apr 13, 2022

Some of the docs.github.com links are failing the CI check with a 403 status, even though they load fine for me in my browser.

This problem was already happening before the changes proposed here:
https://github.com/arduino/tooling-project-assets/runs/5994420427?check_suite_focus=true

It was these spurious failures that motivated me to update the redirecting links, with the idea that maybe all the redirects were somehow causing the link check workflow to pass a threshold where anti-DDoS measures kick in on GitHub's documentation servers. Sadly, it does not seem to have helped, but I think the change is beneficial even though it does not fix the problem of the failing link check.

As for the issue of the failing links check (unrelated to this PR), this class of problem has resolved itself in other cases. If that does not happen, I can add the 403 status to the markdown-link-check tool's allow list as a workaround.

@per1234 per1234 requested a review from umbynos April 13, 2022 08:35
@umbynos
Copy link
Contributor

umbynos commented Apr 15, 2022

As for the issue of the failing links check (unrelated to this PR), this class of problem has resolved itself in other cases. If that does not happen, I can add the 403 status to the markdown-link-check tool's allow list as a workaround.

If it's an anti-DDoS measure, it would be possible to have a retry mechanism or a "delay" one?

@per1234 per1234 merged commit 738f82b into arduino:main Apr 15, 2022
@per1234 per1234 deleted the improve-links branch April 15, 2022 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants