From 64e8532a50879edf12eb76be98a4488d81812f45 Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Mon, 9 Nov 2020 11:18:22 +0530
Subject: [PATCH] head: load stylesheet resources with a wildcard
- include profile-mode
(cannot be done before f9fbdc9963c37b8ee46196de3349d6769839da4d)
- reduce request count from 2 to 1
improves perf :P
https://web.dev/resource-summary/
---
layouts/partials/head.html | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index a3e99750..0d7c0b3f 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -16,26 +16,9 @@
{{- end}}
-{{- $anoldhope := resources.Get "css/an-old-hope.min.css" }}
-{{- $theme := resources.Get "css/theme-vars.css" }}
-{{- $reset := resources.Get "css/reset.css" }}
-{{- $header := resources.Get "css/header.css" }}
-{{- $main := resources.Get "css/main.css" }}
-{{- $postentry := resources.Get "css/post-entry.css" }}
-{{- $postsingle := resources.Get "css/post-single.css" }}
-{{- $terms := resources.Get "css/terms.css" }}
-{{- $archive := resources.Get "css/archive.css" }}
-{{- $footer := resources.Get "css/footer.css" }}
-{{- $404 := resources.Get "css/404.css" }}
-{{- $style := slice $theme $reset $header $main $postentry $postsingle $terms $archive $footer $404 | resources.Concat "stylesheet.css" }}
-{{- $stylesheet := slice $anoldhope $style | resources.Concat "assets/css/stylesheet.css" | minify | fingerprint -}}
+{{- $stylesheet := (resources.Match "css/*.css") | resources.Concat "assets/css/stylesheet.css" | minify | fingerprint -}}
-{{- if (and (.Site.Params.profileMode.enabled) (.IsHome)) }}
-{{- $profileMode := slice (resources.Get "css/profile-mode.css") | resources.Concat "assets/css/profile-mode.css" | minify | fingerprint }}
-
-{{- end -}}