mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
perf: pre-connect to Google Fonts if using Google Fonts
Increase performance.
This commit is contained in:
parent
d8367bbe52
commit
07facf5828
2 changed files with 7 additions and 1 deletions
|
@ -21,7 +21,7 @@
|
|||
<p class="powered-by">
|
||||
{{ if not site.Params.i_am_a_sponsor }}
|
||||
Published with
|
||||
<a href="https://sourcethemes.com/academic/" target="_blank" rel="noopener">Academic Website Builder</a>
|
||||
<a href="https://wowchemy.com" target="_blank" rel="noopener">Wowchemy Website Builder</a>
|
||||
{{ end }}
|
||||
|
||||
{{ if not (in (slice "book" "docs" "updates") .Type) }}
|
||||
|
|
|
@ -44,6 +44,12 @@
|
|||
<link rel="alternate" hreflang="{{ site.LanguageCode | default "en-us" }}" href="{{ .Permalink }}">
|
||||
|
||||
{{ partial "functions/parse_theme" . }}
|
||||
|
||||
{{/* Pre-connect to Google Fonts if the site's Font Theme uses them. */}}
|
||||
{{ with ($scr.Get "google_fonts") }}
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
{{end}}
|
||||
|
||||
{{ $css := site.Data.assets.css }}
|
||||
{{ $js := site.Data.assets.js }}
|
||||
{{ if ne ($scr.Get "primary") "#fff" }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue