-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Guide on font preloading #7451
Copy link
Copy link
Closed
Labels
add new contentDocument something that is not in docs. May require testing, confirmation, or affect other pages.Document something that is not in docs. May require testing, confirmation, or affect other pages.help wantedIssues looking for someone to run with them!Issues looking for someone to run with them!
Metadata
Metadata
Assignees
Labels
add new contentDocument something that is not in docs. May require testing, confirmation, or affect other pages.Document something that is not in docs. May require testing, confirmation, or affect other pages.help wantedIssues looking for someone to run with them!Issues looking for someone to run with them!
Type
Fields
Give feedbackNo fields configured for issues without a type.
📚 Subject area/topic
Using custom fonts
📋 Suggested page
https://docs.astro.build/en/guides/fonts/
📋 General description or bullet points (if proposing new content)
Include information on how to add font preloading.
When a new Astro project is scaffolded using the blog template,
BaseHead.astroincludes font preloading:It would be beneficial if the documentation for setting up fonts included a similar example.
For the local font file setup, all that is needed is to add lines like the ones above.
For Fontsource library the setup is little bit more complicated. There's seems to be no default way how to do this in the Fontsource but there is a workaround which seems to be working very nicely in Astro.
The Astro guide could include something like:
🖥️ Reproduction of code samples in StackBlitz
No response