Browse Source

Use Hugo Pipes

Track3 6 years ago
parent
commit
4b1c914e95

+ 1 - 0
.gitignore

@@ -1,3 +1,4 @@
 .sass-cache/
 public/
+resources/
 hugo.exe

+ 0 - 0
static/js/main.js → assets/js/main.js


+ 0 - 0
static/scss/_animate.scss → assets/scss/_animate.scss


+ 0 - 0
static/scss/_normalize.scss → assets/scss/_normalize.scss


+ 0 - 0
static/scss/_predefined.scss → assets/scss/_predefined.scss


+ 0 - 0
static/scss/_syntax.scss → assets/scss/_syntax.scss


+ 0 - 0
static/scss/style.scss → assets/scss/style.scss


+ 4 - 2
layouts/_default/baseof.html

@@ -20,7 +20,8 @@
 	{{ range .AlternativeOutputFormats -}}
 		{{ printf `<link rel="%s" type="%s+%s" href="%s" title="%s" />` .Rel .MediaType.Type .MediaType.Suffix .Permalink $.Site.Title | safeHTML }}
 	{{ end -}}
-	<link rel="stylesheet" href="{{ "css/style.css" | absURL }}">
+	{{ $style := resources.Get "scss/style.scss" | toCSS | minify | fingerprint -}}
+	<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
 	{{ block "head" . -}}{{- end }}
 </head>
 
@@ -28,7 +29,8 @@
 	{{ block "header" . -}}{{ end -}}
 	{{ block "main" . -}}{{ end -}}
 	{{ block "footer" . -}}{{ end }}
-	<script src="{{ "js/main.min.js" | absURL }}"></script>
+	{{ $script := resources.Get "js/main.js" | minify | fingerprint -}}
+	<script src="{{ $script.Permalink }}" integrity="{{ $script.Data.Integrity }}"></script>
 	<script>
 		var _hmt = _hmt || [];
 		(function() {

File diff suppressed because it is too large
+ 0 - 0
static/css/style.css


File diff suppressed because it is too large
+ 0 - 0
static/js/main.min.js


Some files were not shown because too many files changed in this diff