diff options
author | Emiel Hollander <EmielH@users.noreply.github.com> | 2019-04-14 20:45:11 +0300 |
---|---|---|
committer | Emiel Hollander <EmielH@users.noreply.github.com> | 2019-04-14 20:45:11 +0300 |
commit | ad9cf5ad3816b7cc47b6e86bb65d54f773673591 (patch) | |
tree | aa58280093c5bd3254c5430df9cfe704e533871e | |
parent | 39044334e6e313473e60a6618669ad1823398129 (diff) |
Remove deprecated .Page.URL
Replaced with .RelPermalink where applicable. Checking if a page is the
home page can be done using .IsHome instead.
-rw-r--r-- | layouts/_default/single.html | 4 | ||||
-rw-r--r-- | layouts/partials/head.html | 15 |
2 files changed, 9 insertions, 10 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b056b0e..dba8344 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -14,10 +14,10 @@ <div class="pagination"> {{- if .PrevPage }} - <a href="{{ .PrevPage.URL }}" class="left arrow">←</a> + <a href="{{ .PrevPage.RelPermalink }}" class="left arrow">←</a> {{- end }} {{- if .NextPage }} - <a href="{{ .NextPage.URL }}" class="right arrow">→</a> + <a href="{{ .NextPage.RelPermalink }}" class="right arrow">→</a> {{- end }} <a href="#" class="top">Top</a> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 4b2d79b..7567b68 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,37 +1,36 @@ <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 }} · {{ .Site.Title }} {{- end }} </title> - + <!-- 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/tale.scss" | toCSS $cssOptions }} <link rel="stylesheet" href="{{ $style.RelPermalink }}"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700"> {{ range .Site.Params.css -}} <link rel="stylesheet" href="{{ . | relURL }}"> {{ end -}} - + <!-- Favicon --> <link rel="icon" type="image/png" sizes="32x32" href="{{ "images/favicon-32x32.png" | relURL }}"> <link rel="icon" type="image/png" sizes="16x16" href="{{ "images/favicon-16x16.png" | relURL }}"> <link rel="apple-touch-icon" sizes="180x180" href="{{ "images/apple-touch-icon.png" | relURL }}"> - + <!-- RSS --> <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> </head> -
\ No newline at end of file |