From 9c36be1320e770ce81a0e8671a74a254d24ac2be Mon Sep 17 00:00:00 2001 From: Amir Pourmand Date: Sat, 30 Oct 2021 23:56:37 +0330 Subject: [PATCH] Optimize Website Load Time (#435) * Place js files after body tag * Add Analytics to the end of script * Minor nits and fixes Co-authored-by: Maruan Al-Shedivat --- _includes/head.html | 30 ------------------------------ _includes/scripts/analytics.html | 21 +++++++++++++++++++++ _includes/scripts/misc.html | 6 ++++++ _layouts/default.html | 4 +++- 4 files changed, 30 insertions(+), 31 deletions(-) create mode 100644 _includes/scripts/analytics.html diff --git a/_includes/head.html b/_includes/head.html index 3b1f1f3..97a93d6 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -42,33 +42,3 @@ {% endif %} - - -{% include scripts/jquery.html %} - - -{% if site.enable_darkmode %} - - -{% endif %} - -{% if site.enable_google_analytics %} - - - -{% endif %} - -{% if site.enable_panelbear_analytics %} - - - -{% endif %} diff --git a/_includes/scripts/analytics.html b/_includes/scripts/analytics.html new file mode 100644 index 0000000..504d39b --- /dev/null +++ b/_includes/scripts/analytics.html @@ -0,0 +1,21 @@ +{% if site.enable_google_analytics %} + + + +{% endif %} + + +{% if site.enable_panelbear_analytics %} + + + +{% endif %} diff --git a/_includes/scripts/misc.html b/_includes/scripts/misc.html index 260ce1b..c2188d4 100644 --- a/_includes/scripts/misc.html +++ b/_includes/scripts/misc.html @@ -1,3 +1,9 @@ +{% if site.enable_darkmode %} + + + +{% endif %} + {% if site.enable_tooltips %}