switches to deferred FA javascript

This commit is contained in:
Huy Tran 2018-07-26 17:49:47 +10:00
parent 9aefa9b55a
commit 0b25bef171
5 changed files with 14 additions and 6 deletions

View file

@ -1,4 +1,5 @@
{{ if and (not .Site.BuildDrafts) (.Site.GoogleAnalytics) -}}
{{ "<!-- Google Analytics -->" | safeHTML }}
{{ template "_internal/google_analytics_async.html" . }}
{{- end }}
{{ partial "footer/font-awesome-js.html" . }}
{{ if (.Site.GoogleAnalytics) -}}
{{ "<!-- Google Analytics -->" | safeHTML }}
{{ template "_internal/google_analytics_async.html" . }}
{{- end }}

View file

@ -0,0 +1 @@
<script defer src="https://use.fontawesome.com/releases/v5.2.0/js/all.js" integrity="sha384-4oV5EgaV02iISL2ban6c/RmotsABqE4yZxZLcYMAdG7FAPsyHYAPpywE9PJo+Khy" crossorigin="anonymous"></script>

View file

@ -1,8 +1,6 @@
<head>
<link href="http://gmpg.org/xfn/11" rel="profile">
{{ partial "header/meta.html" . }}
{{ "<!-- Font-Awesome -->" | safeHTML }}
{{ partial "header/font-awesome.html" . }}
{{ "<!-- highlighting -->" | safeHTML }}
{{ partial "header/highlight-css.html" . }}
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/print.min.css" media="print">