From e10c186a7405046702c30b8a142ae2c8d7ba4ff8 Mon Sep 17 00:00:00 2001 From: Emiel Hollander Date: Sun, 14 Apr 2019 16:57:40 +0200 Subject: Remove deprecated .Page.URL Checking if a page is the home page can be done using .IsHome instead --- layouts/partials/head.html | 6 +++--- 1 file 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 @@ - {{- if eq .URL "/" }} + {{- if .IsHome }} {{- else if .Description }} {{- end }} - {{- if eq .URL "/" }} + {{- if .IsHome }} {{ .Site.Title }} {{- else }} {{ .Title }} · {{ .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 }}"> -- cgit v1.2.3