Skip to content

Commit

Permalink
Loads font-awesome asynchronously (mmistakes#2967)
Browse files Browse the repository at this point in the history
Loading font-awesome asynchronously allows to display the site faster. This change is advised by google pagespeed insights
  • Loading branch information
ghusse authored and chukycheese committed Sep 18, 2023
1 parent 83f75ef commit 5afdd84
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

<!-- For all browsers -->
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css">
<link rel="preload" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5/css/all.min.css"></noscript>

<!--[if IE]>
<style>
Expand All @@ -36,4 +37,4 @@
{% for script in site.head_scripts %}
<script src="{{ script | relative_url }}"></script>
{% endfor %}
{% endif %}
{% endif %}

0 comments on commit 5afdd84

Please sign in to comment.