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 too strict "relative link" errors in docs website #1149

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

FredKSchott
Copy link
Member

@FredKSchott FredKSchott commented Aug 18, 2021

Changes

  • Astro.resolve #1085 added a "relative link" warning if a component uses a relative URL for an attribute
  • this created false positive warnings for pages in the docs site:
[dev server] Server started in 904ms.
[dev server] Local: http:https://localhost:3000/
[access] /
[relative-link] This value will be resolved relative to the page: <a href="#article">
[access] /getting-started
[relative-link] This value will be resolved relative to the page: <a href="quick-start">
[relative-link] This value will be resolved relative to the page: <a href="#article">
  • This PR removes warnings for #hash URLs which aren't really relative
  • This PR also changes the warning to not warn on pages, since pages can assume relative URLs work. This is especially common for Markdown. In docs specifically, we use relative so that relative links continue to work regardless of what /LANG/... i18n collection you are inside of.

@vercel
Copy link

vercel bot commented Aug 18, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

astro-www – ./www

🔍 Inspect: https://vercel.com/pikapkg/astro-www/5DffN5pv2E12uU1tztWnAvEMHntL
✅ Preview: Canceled

astro-docs – ./docs

🔍 Inspect: https://vercel.com/pikapkg/astro-docs/CitVMz9yCBkZvDWKGHDbboXMBCNa
✅ Preview: https://astro-docs-git-fix-docs-relative-errors-pikapkg.vercel.app

@changeset-bot
Copy link

changeset-bot bot commented Aug 18, 2021

⚠️ No Changeset found

Latest commit: a484da4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@FredKSchott
Copy link
Member Author

This is a pretty distracting change on www and docs, to the point that it feels like a full-on bug. I'm going to merge for 0.19.0, but if this is a controversial change I'm happy to discuss what it would look like to add back this warning by reverting this for 0.19.1

@FredKSchott FredKSchott merged commit c4e9ce3 into main Aug 18, 2021
@FredKSchott FredKSchott deleted the fix-docs-relative-errors branch August 18, 2021 16:05
SiriousHunter pushed a commit to SiriousHunter/astro that referenced this pull request Feb 3, 2023
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.

None yet

1 participant