Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0f3258f2db | |||
| 8d367dfa79 |
@@ -0,0 +1,7 @@
|
||||
{{/* Call this with a resource's content e.g., partial "human_file_size" .Content */}}
|
||||
{{- $bytes := len . -}}
|
||||
{{- $kb := div $bytes 1024 -}}
|
||||
{{- $mb := div $kb 1024 -}}
|
||||
{{- if ge $mb 1 -}}{{- $mb -}} MB
|
||||
{{- else if ge $kb 1 -}}{{- $kb -}} KB
|
||||
{{- else -}}{{- $bytes -}} B{{- end -}}
|
||||
+21
-22
@@ -1,27 +1,26 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} - {{ .Site.Title }}{{ end }}</title>
|
||||
<meta name="description" content="{{ .Page.Params.description }}">
|
||||
<meta name="author" content="{{ .Site.Params.author }}">
|
||||
<meta name="generator" content="{{ hugo.Environment }}">
|
||||
<meta name="author" content="{{ or .Page.Params.author .Site.Params.author }}">
|
||||
<meta name="generator" content="gohugo.io; {{ hugo.Environment }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" type="image/png" href="/img/favicon.png">
|
||||
|
||||
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} - {{ .Site.Title }}{{ end }}</title>
|
||||
|
||||
<!-- Compile SCSS to CSS -->
|
||||
{{ with resources.Get "scss/main.scss" }}
|
||||
{{ $opts := dict
|
||||
"enableSourceMap" (not hugo.IsProduction)
|
||||
"outputStyle" (cond hugo.IsProduction "compressed" "expanded")
|
||||
"targetPath" "css/main.css"
|
||||
"transpiler" "dartsass"
|
||||
}}
|
||||
{{ with . | toCSS $opts }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ with . | fingerprint "sha512" }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- with resources.Get "scss/main.scss" -}}
|
||||
{{- $opts := dict
|
||||
"enableSourceMap" (not hugo.IsProduction)
|
||||
"outputStyle" (cond hugo.IsProduction "compressed" "expanded")
|
||||
"targetPath" "css/main.css"
|
||||
"transpiler" "dartsass"
|
||||
-}}
|
||||
{{- with . | toCSS $opts -}}
|
||||
{{- if hugo.IsProduction -}}
|
||||
{{- with . | fingerprint "sha512" -}}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}">
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user