Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Chen-Zhe/photo-grid.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Zhe <chenzhesg@gmail.com>2022-01-05 01:07:27 +0300
committerChen Zhe <chenzhesg@gmail.com>2022-01-05 01:07:27 +0300
commitb60988168bef16edd5a24dce71fb1c9d1581c709 (patch)
treea8d3891544a9aeab793171ed2a7ae3fa9ebdb479
parent511f696ff290b7d1db450f8d48b9ca55a518f5f0 (diff)
auto minify css and js
-rw-r--r--assets/css/component.css (renamed from static/css/component.css)0
-rw-r--r--assets/css/default.css (renamed from static/css/default.css)0
-rw-r--r--assets/js/main.js (renamed from static/js/main.js)0
-rw-r--r--layouts/partials/head.html6
-rw-r--r--layouts/partials/scripts.html2
5 files changed, 4 insertions, 4 deletions
diff --git a/static/css/component.css b/assets/css/component.css
index 493188a..493188a 100644
--- a/static/css/component.css
+++ b/assets/css/component.css
diff --git a/static/css/default.css b/assets/css/default.css
index ea88574..ea88574 100644
--- a/static/css/default.css
+++ b/assets/css/default.css
diff --git a/static/js/main.js b/assets/js/main.js
index 68b577c..68b577c 100644
--- a/static/js/main.js
+++ b/assets/js/main.js
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 6b223df..6e27d27 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -20,9 +20,9 @@
}
</style>
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Lato:300,400,700" />
- <link rel="stylesheet" type="text/css" href="{{ "css/default.css" | absURL }}" />
- <link rel="stylesheet" type="text/css" href="{{ "css/component.css" | absURL }}" />
+ <link rel="stylesheet" type="text/css" href="{{ (resources.Get "css/default.css" | minify).RelPermalink }}" />
+ <link rel="stylesheet" type="text/css" href="{{ (resources.Get "css/component.css" | minify).RelPermalink }}" />
{{ range .Site.Params.custom_css }}
<link rel="stylesheet" href="{{ . }}">
{{ end }}
- <script src="{{ "js/modernizr.custom.js" | absURL }}"></script>
+ <script src="{{ "js/modernizr.custom.js" | relURL }}"></script>
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 99ac263..3179253 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -1,2 +1,2 @@
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.5.1.min.js"></script>
- <script src="{{ "js/main.js" | absURL }}"></script>
+ <script src="{{ (resources.Get "js/main.js" | minify).RelPermalink }}"></script>