mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
Add preload tag for main.css (#577)
* Add preload tag for main.css Improve performance. In addition, CloudFlare has supported early hints with this tag. See https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types/preload See also https://blog.cloudflare.com/early-hints-on-cloudflare-pages/ * Associate with the preconnect option Co-authored-by: Mimi <stevenjoezhang@gmail.com>
This commit is contained in:
parent
c85cbe7c0e
commit
110cb84626
@ -336,7 +336,7 @@ calendar:
|
||||
# See: https://theme-next.js.org/docs/theme-settings/miscellaneous
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
# Preconnect CDN for fonts and plugins.
|
||||
# Preload styles and preconnect CDN for fonts and plugins.
|
||||
# For more information: https://www.w3.org/TR/resource-hints/#preconnect
|
||||
preconnect: false
|
||||
|
||||
|
||||
@ -10,6 +10,9 @@
|
||||
{{- meta_generator() }}
|
||||
{%- endif %}
|
||||
|
||||
{%- if config.preconnect %}
|
||||
<link rel="preload" href="{{ url_for(theme.css) }}/main.css" as="style">
|
||||
{%- endif %}
|
||||
{{ next_pre() }}
|
||||
|
||||
{%- if theme.favicon.apple_touch_icon %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user