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: Add base href to each page to fix relative URLs #16046
Conversation
✅ Deploy Preview for docs-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks UI in deploy previews, too. Maybe we should add <base>
only in production builds?
Hmmm, that will make it impossible to know if there’s a problem until we push live, as we can’t really test locally either. There must be a way to make this work for deploy preview that will give us confidence that it will work live. |
So this is a cross-origin fetch error, because the base URL is for |
In deploy previews, if |
We could maybe try with domain-relative URLs in |
Turns out you can use a relative base URL, and that will work everywhere. 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I don't see anything wrong in the deploy preview.
But the preview is doing trailing slash redirects, so it seems that the only way to find out if this fixes the issue is to merge and test with proxying on https://eslint.org/docs/head/
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try this in prod 🚀
This seems to work well! I checked relative links on https://eslint.org/docs/head/user-guide/configuring and they are good now, unlike the links on the current https://eslint.org/docs/latest/user-guide/configuring page. The only thing that looks a bit unusual on non-canonical URLs is that anchor-only links ( |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [eslint](https://eslint.org) ([source](https://github.com/eslint/eslint)) | devDependencies | minor | [`8.18.0` -> `8.19.0`](https://renovatebot.com/diffs/npm/eslint/8.18.0/8.19.0) | --- ### Release Notes <details> <summary>eslint/eslint</summary> ### [`v8.19.0`](https://github.com/eslint/eslint/releases/tag/v8.19.0) [Compare Source](eslint/eslint@v8.18.0...v8.19.0) #### Features - [`7023628`](eslint/eslint@7023628) feat: add importNames support for patterns in no-restricted-imports ([#​16059](eslint/eslint#16059)) (Brandon Scott) - [`472c368`](eslint/eslint@472c368) feat: fix handling of blockless `with` statements in indent rule ([#​16068](eslint/eslint#16068)) (Milos Djermanovic) #### Bug Fixes - [`fc81848`](eslint/eslint@fc81848) fix: throw helpful exception when rule has wrong return type ([#​16075](eslint/eslint#16075)) (Bryan Mishkin) #### Documentation - [`3ae0574`](eslint/eslint@3ae0574) docs: Remove duplicate rule descriptions ([#​16052](eslint/eslint#16052)) (Amaresh S M) - [`f50cf43`](eslint/eslint@f50cf43) docs: Add base href to each page to fix relative URLs ([#​16046](eslint/eslint#16046)) (Nicholas C. Zakas) - [`ae4b449`](eslint/eslint@ae4b449) docs: make logo link clickable on small width screens ([#​16058](eslint/eslint#16058)) (Milos Djermanovic) - [`280f898`](eslint/eslint@280f898) docs: use only fenced code blocks ([#​16044](eslint/eslint#16044)) (Milos Djermanovic) - [`f5d63b9`](eslint/eslint@f5d63b9) docs: add listener only if element exists ([#​16045](eslint/eslint#16045)) (Amaresh S M) - [`8b639cc`](eslint/eslint@8b639cc) docs: add missing migrating-to-8.0.0 in the user guide ([#​16048](eslint/eslint#16048)) (唯然) - [`b8e68c1`](eslint/eslint@b8e68c1) docs: Update release process ([#​16036](eslint/eslint#16036)) (Nicholas C. Zakas) - [`6d0cb11`](eslint/eslint@6d0cb11) docs: remove table of contents from markdown text ([#​15999](eslint/eslint#15999)) (Nitin Kumar) #### Chores - [`e884933`](eslint/eslint@e884933) chore: use `github-slugger` for markdown anchors ([#​16067](eslint/eslint#16067)) (Strek) - [`02e9cb0`](eslint/eslint@02e9cb0) chore: revamp carbon ad style ([#​16078](eslint/eslint#16078)) (Amaresh S M) - [`b6aee95`](eslint/eslint@b6aee95) chore: remove unwanted comments from rules markdown ([#​16054](eslint/eslint#16054)) (Strek) - [`6840940`](eslint/eslint@6840940) chore: correctly use .markdownlintignore in Makefile ([#​16060](eslint/eslint#16060)) (Bryan Mishkin) - [`48904fb`](eslint/eslint@48904fb) chore: add missing images ([#​16017](eslint/eslint#16017)) (Amaresh S M) - [`910f741`](eslint/eslint@910f741) chore: add architecture to nav ([#​16039](eslint/eslint#16039)) (Strek) - [`9bb24c1`](eslint/eslint@9bb24c1) chore: add correct incorrect in all rules doc ([#​16021](eslint/eslint#16021)) (Deepshika S) - [`5a96af8`](eslint/eslint@5a96af8) chore: prepare versions data file ([#​16035](eslint/eslint#16035)) (Nicholas C. Zakas) - [`50afe6f`](eslint/eslint@50afe6f) chore: Included githubactions in the dependabot config ([#​15985](eslint/eslint#15985)) (Naveen) - [`473411e`](eslint/eslint@473411e) chore: add deploy workflow for playground ([#​16034](eslint/eslint#16034)) (Milos Djermanovic) - [`a30b66c`](eslint/eslint@a30b66c) chore: fix print style ([#​16025](eslint/eslint#16025)) (Amaresh S M) - [`f4dad59`](eslint/eslint@f4dad59) chore: add noindex meta tag ([#​16016](eslint/eslint#16016)) (Milos Djermanovic) - [`db387a8`](eslint/eslint@db387a8) chore: fix sitemap ([#​16026](eslint/eslint#16026)) (Milos Djermanovic) - [`285fbc5`](eslint/eslint@285fbc5) chore: remove TOC from printable ([#​16020](eslint/eslint#16020)) (Strek) - [`8e84c21`](eslint/eslint@8e84c21) chore: remove ligatures from fonts ([#​16019](eslint/eslint#16019)) (Strek) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Co-authored-by: cabr2-bot <cabr2.help@gmail.com> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1444 Reviewed-by: 6543 <6543@noreply.codeberg.org> Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org> Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[x] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
This adds
<base>
to each page so relative URLs work correctly.Fixes #15844
Is there anything you'd like reviewers to focus on?
Please double-check the deploy preview because this can't really be tested locally.