Improved font loading method for better performance

This commit is contained in:
Sodbileg Gansukh
2024-06-17 15:40:06 +08:00
parent 9a2f77a5b9
commit e860b018a3
8 changed files with 74 additions and 46 deletions

View File

@@ -10,6 +10,9 @@
{{!-- Preload main styles and scripts for better performance --}}
<link rel="preload" as="style" href="{{asset "built/screen.css"}}">
<link rel="preload" as="script" href="{{asset "built/source.js"}}">
{{!-- Fonts are preloaded and defined in the default template to avoid layout shift --}}
{{> "typography/fonts"}}
{{!-- Theme assets - use the {{asset}} helper to reference styles & scripts, this will take care of caching and cache-busting automatically --}}
<link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}">