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

Fix link issues after hard-reloading pages #547

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

planger
Copy link
Contributor

@planger planger commented Apr 19, 2024

On hard reload the URL ending with xyz/ sometimes becomes xyz, which then breaks all relative internal links. With this change, we are adding gatsby-plugin-catch-links to ensure internal links work either way. Also we update the readme to reflect where the website is now hosted.

@planger planger temporarily deployed to pull-request-preview April 19, 2024 07:34 — with GitHub Actions Inactive
Copy link

github-actions bot commented Apr 19, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-04-19 09:26 UTC

@planger planger temporarily deployed to pull-request-preview April 19, 2024 07:38 — with GitHub Actions Inactive
@planger planger temporarily deployed to pull-request-preview April 19, 2024 07:48 — with GitHub Actions Inactive
@planger planger marked this pull request as ready for review April 19, 2024 07:54
@planger planger temporarily deployed to pull-request-preview April 19, 2024 07:55 — with GitHub Actions Inactive
On hard reload the URL ending with `xyz/` sometimes becomes `xyz`, which
then breaks all relative internal  links. With this change, we are
adding `gatsby-plugin-catch-links` to ensure internal links work either
way. Also we update the readme to reflect where the website is now
hosted.
@xai
Copy link
Contributor

xai commented Apr 19, 2024

I could reproduce the problem on current master with, .e.g., https://theia-ide.org/docs/services_and_contributions/ and its link to theia-extensions: Hard reload -> click -> 404.

After testing several pages (and, additionally, using a link-checking tool), I can confirm that this behavior is gone in the preview of this PR. According to git grep -Eo '\[.+\]\(.*\)' | grep -Ev '\((/|http)', we only have very few relative links left:

src/docs/authoring_vscode_extensions.md:[prerequisites](#prerequisites-for-running-vs-code-extensions-in-theia))
src/docs/blueprint_documentation.md:[Building a product and installers](#building-a-product-and-installers)
src/docs/blueprint_documentation.md:[Signing](#signing)
src/docs/blueprint_documentation.md:[Adding/removing Features](#addingremoving-features)
src/docs/blueprint_documentation.md:[Updating Bundled VS Code Extensions](#updating-bundled-vs-code-extensions)
src/docs/blueprint_documentation.md:[Customizing Theia Extensions](#customizing-theia-extensions)
src/docs/blueprint_documentation.md:[Branding](#branding)
src/docs/blueprint_documentation.md:[Configure Publish and Update](#configure-publish-and-update)
src/docs/summary.md:[Theia](README.md)
src/docs/summary.md:[Overview](Architecture.md)
src/docs/summary.md:[Extensions](Extensions.md)
src/docs/summary.md:[Services and Contributions](Services_and_Contributions.md)
src/docs/summary.md:[Build your own IDE](Composing_Applications.md)
src/docs/summary.md:[Authoring an Extension](Authoring_Extensions.md)
src/docs/summary.md:[Authoring Plug-ins](Authoring_Plugins.md)
src/docs/summary.md:[Commands and Keybindings](Commands_Keybindings.md)
src/docs/summary.md:[Preferences](Preferences.md)
src/docs/summary.md:[Events](Events.md)
src/docs/summary.md:[Communication via JSON-RPC](Json_Rpc.md)
src/docs/summary.md:[Download](blueprint_download.md)
src/docs/summary.md:[Documentation](blueprint_documentation.md)

The ones in blueprint_documentation would not cause issues, the ones in summary.md do but I cannot find where that site is linked/used.

@planger planger changed the title Fix link issues Fix link issues after hard-reloading pages Apr 19, 2024
@planger planger merged commit bf6944f into eclipse-theia:master Apr 19, 2024
8 checks passed
@planger planger deleted the fix-md-links branch April 19, 2024 09:26
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.

3 participants