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

Prefetch links on hover by default #1242

Merged
merged 4 commits into from
Dec 6, 2023
Merged

Prefetch links on hover by default #1242

merged 4 commits into from
Dec 6, 2023

Conversation

delucis
Copy link
Member

@delucis delucis commented Dec 6, 2023

Description

  • Enables Astro’s prefetch.prefetchAll config option by default for all Starlight users.

  • Users can opt out or customise the prefetching strategy using Astro’s prefetch configuration options

  • Note: Had to bump our size limit JS budget by 1 kB as this does add roughly 1kB to our JS bundle. I think it should be worth it for the snappier navigation and people will be able to opt out if they need.

Copy link

changeset-bot bot commented Dec 6, 2023

🦋 Changeset detected

Latest commit: a929139

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@astrojs/starlight Minor

Not sure what this means? Click here to learn what changesets are.

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

Copy link

vercel bot commented Dec 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
starlight ✅ Ready (Inspect) Visit Preview Dec 6, 2023 5:11pm

@github-actions github-actions bot added the 🌟 core Changes to Starlight’s main package label Dec 6, 2023
@delucis delucis added 🌟 minor Change that triggers a minor release and removed 🌟 core Changes to Starlight’s main package labels Dec 6, 2023
@astrobot-houston
Copy link
Collaborator

astrobot-houston commented Dec 6, 2023

size-limit report 📦

Path Size
/index.html 5.21 KB (+0.31% 🔺)
/_astro/*.js 21.42 KB (+4.65% 🔺)
/_astro/*.css 13.04 KB (0%)

@github-actions github-actions bot added the 🌟 core Changes to Starlight’s main package label Dec 6, 2023
Copy link
Member

@dreyfus92 dreyfus92 left a comment

Choose a reason for hiding this comment

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

Awesome @delucis, just a small typo to fix. Aside from that LGTM 🫡

packages/starlight/index.ts Outdated Show resolved Hide resolved
Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
Copy link

@matthewp matthewp left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Sponsor Member

@kevinzunigacuellar kevinzunigacuellar left a comment

Choose a reason for hiding this comment

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

Living Graciously, Taking Moments

@delucis delucis merged commit d8fc9e1 into main Dec 6, 2023
8 checks passed
@delucis delucis deleted the chris/prefetch branch December 6, 2023 18:26
@astrobot-houston astrobot-houston mentioned this pull request Dec 6, 2023
HiDeoo added a commit to HiDeoo/starlight that referenced this pull request Dec 13, 2023
* main: (440 commits)
  i18n(fr): update `getting-started.mdx` (withastro#1245)
  [ci] format
  docs(showcase): add csmos.space (withastro#1269)
  [ci] format
  docs: add SiteOne Crawler to showcase (withastro#1264)
  Fix formatting
  [ci] format
  docs(i18n): Add Indonesian translation for site search documentation (withastro#1250)
  i18n(es): fix typo (withastro#1246)
  i18n(ja): Update getting-started.mdx (withastro#1252)
  i18n(es): Update `getting-started.mdx` (withastro#1247)
  i18n(ko-KR): update `getting-started.mdx` (withastro#1248)
  Update upgrade instructions to show new `@astrojs/upgrade` (withastro#1241)
  [ci] format
  [ci] release (withastro#1240)
  i18n(ru): Fix typo in `i18n.untranslatedContent` (withastro#1243)
  Fix timezone-reliance in LastUpdated (withastro#1170)
  Prefetch links on hover by default (withastro#1242)
  Add support for Astro v4, drop support for Astro v3 (withastro#1238)
  Add Matrix social icon (withastro#1203)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 core Changes to Starlight’s main package 🌟 minor Change that triggers a minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants