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

github.com/EmielH/hallo-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmiel Hollander <EmielH@users.noreply.github.com>2019-04-14 17:57:40 +0300
committerEmiel Hollander <EmielH@users.noreply.github.com>2019-04-14 17:57:48 +0300
commite10c186a7405046702c30b8a142ae2c8d7ba4ff8 (patch)
tree511854d32989a479aaec8660fdf19a1d46278c31 /layouts
parentd92837df07fdf3bf8c927fd523036b3d2a0b1412 (diff)
Remove deprecated .Page.URL
Checking if a page is the home page can be done using .IsHome instead
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/head.html6
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index d542ae4..5e1a0be 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,14 +1,14 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- {{- if eq .URL "/" }}
+ {{- if .IsHome }}
<meta name="description" content="{{ .Site.Params.Description }}">
{{- else if .Description }}
<meta name="description" content="{{ .Description }}">
{{- end }}
<title>
- {{- if eq .URL "/" }}
+ {{- if .IsHome }}
{{ .Site.Title }}
{{- else }}
{{ .Title }} &middot; {{ .Site.Title }}
@@ -18,7 +18,7 @@
<!-- CSS -->
{{- $inServerMode := .Site.IsServer }}
{{- $cssTarget := "css/style.css" }}
- {{- $cssOptions := cond ($inServerMode) (dict "targetPath" $cssTarget "enableSourceMap" true) (dict "targetPath" $cssTarget "outputStyle" "compressed") }}
+ {{- $cssOptions := cond ($inServerMode) (dict "targetPath" $cssTarget "enableSourceMap" true) (dict "targetPath" $cssTarget "outputStyle" "compressed") }}
{{- $style := resources.Get "scss/hallo.scss" | resources.ExecuteAsTemplate "style.hallo.scss" . | toCSS $cssOptions }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">