diff options
author | Yoshiharu Yamashita <yoshiharuyamashita@users.noreply.github.com> | 2021-02-25 21:49:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-25 21:49:19 +0300 |
commit | fe92751ad5606f29906d96814fc93421d0366b3c (patch) | |
tree | 7fccc381671fcdc24d48178bcac89dd6be647233 | |
parent | 1f689c3db1e37ce6683c72640e4be3bac551174c (diff) | |
parent | c4b6260e50296eaf63f38d861cb3109a892732d8 (diff) |
Merge pull request #117 from Tristor/asyncJS
Performance improvements by asynchronous loading of optional JS extensions in the header
-rw-r--r-- | layouts/partials/head.html | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 8f7662c..2202ff4 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -31,13 +31,14 @@ <link rel="stylesheet" href="/css/blackburn.css"> <!-- Icons --> - <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.9.0/css/all.css"> + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css"> <!-- Fonts --> - <link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type="text/css"> + <link rel="preconnect" href="https://fonts.gstatic.com"> + <link href="https://fonts.googleapis.com/css2?family=Raleway&display=swap" rel="stylesheet" type="text/css"> <!-- MathJax --> - <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> + <script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <!-- RSS --> {{ if .OutputFormats.Get "RSS" }} @@ -47,9 +48,9 @@ {{ with .Site.Params.highlightjs }} <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/styles/{{ . }}.min.css"> - <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/highlight.min.js"></script> + <script async src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/highlight.min.js"></script> {{ range $.Site.Params.highlightjs_extra_languages }} - <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/languages/{{ . }}.min.js"></script> + <script async src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.6.0/languages/{{ . }}.min.js"></script> {{ end }} <script>hljs.initHighlightingOnLoad();</script> {{ end }} |