commit ff1905f0244b2a1204840ed6ee9d30b92eb2461e
parent 2f44993e437f610761fe8719fd6e0523a24eaf07
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Mon, 24 Jun 2019 09:35:57 +0200
Address deprecation warnings for relative page URLs and RSS link
Diffstat:
7 files changed, 33 insertions(+), 35 deletions(-)
diff --git a/themes/tale-mod/layouts/_default/single.da.html b/themes/tale-mod/layouts/_default/single.da.html
@@ -49,12 +49,12 @@
 
     <div class="pagination">
         {{- if .PrevPage }}
-        <!-- <a href="{{ .PrevPage.URL }}" class="left arrow">← Previous</a> -->
-        <a href="{{ .PrevPage.URL }}" class="right arrow">Næste serie →</a>
+        <!-- <a href="{{ .PrevPage.RelPermalink }}" class="left arrow">← Previous</a> -->
+        <a href="{{ .PrevPage.RelPermalink }}" class="right arrow">Næste serie →</a>
         {{- end }}
         {{- if .NextPage }}
-        <!-- <a href="{{ .NextPage.URL }}" class="right arrow">Next →</a> -->
-        <a href="{{ .NextPage.URL }}" class="left arrow">← Forrige serie</a>
+        <!-- <a href="{{ .NextPage.RelPermalink }}" class="right arrow">Next →</a> -->
+        <a href="{{ .NextPage.RelPermalink }}" class="left arrow">← Forrige serie</a>
         {{- end }}
 
         <a href="{{ .Site.BaseURL }}{{ .Lang }}" class="top">Hjem</a>
diff --git a/themes/tale-mod/layouts/_default/single.html b/themes/tale-mod/layouts/_default/single.html
@@ -49,12 +49,12 @@
 
     <div class="pagination">
         {{- if .PrevPage }}
-        <!-- <a href="{{ .PrevPage.URL }}" class="left arrow">← Previous</a> -->
-        <a href="{{ .PrevPage.URL }}" class="right arrow">Next series →</a>
+        <!-- <a href="{{ .PrevPage.RelPermalink }}" class="left arrow">← Previous</a> -->
+        <a href="{{ .PrevPage.RelPermalink }}" class="right arrow">Next series →</a>
         {{- end }}
         {{- if .NextPage }}
-        <!-- <a href="{{ .NextPage.URL }}" class="right arrow">Next →</a> -->
-        <a href="{{ .NextPage.URL }}" class="left arrow">← Previous series</a>
+        <!-- <a href="{{ .NextPage.RelPermalink }}" class="right arrow">Next →</a> -->
+        <a href="{{ .NextPage.RelPermalink }}" class="left arrow">← Previous series</a>
         {{- end }}
 
         <a href="{{ .Site.BaseURL }}" class="top">Home</a>
diff --git a/themes/tale-mod/layouts/about/list.html b/themes/tale-mod/layouts/about/list.html
@@ -12,10 +12,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/themes/tale-mod/layouts/index.da.html b/themes/tale-mod/layouts/index.da.html
@@ -12,15 +12,14 @@
 			</a>
 		{{ end }}
 	</div>
-	
+
 	<div class="pagination">
 		{{ if .Paginator.HasPrev }}
-			<a href="{{ .Paginator.PrevPage.URL }}" class="left arrow">←</a>
+			<a href="{{ .Paginator.PrevPage.RelPermalink }}" class="left arrow">←</a>
 		{{ end }}
         <a href="{{ .Site.BaseURL }}{{ .Lang }}" class="top">Hjem</a>
 		{{ if .Paginator.HasNext }}
-			<a href="{{ .Paginator.NextPage.URL }}" class="right arrow">→</a>
-	
+			<a href="{{ .Paginator.NextPage.RelPermalink }}" class="right arrow">→</a>
 		<span>{{ .Paginator.PageNumber }}</span>
 		{{ end }}
 	</div>
diff --git a/themes/tale-mod/layouts/index.html b/themes/tale-mod/layouts/index.html
@@ -15,11 +15,11 @@
 	
 	<div class="pagination">
 		{{ if .Paginator.HasPrev }}
-			<a href="{{ .Paginator.PrevPage.URL }}" class="left arrow">←</a>
+			<a href="{{ .Paginator.PrevPage.RelPermalink }}" class="left arrow">←</a>
 		{{ end }}
         <a href="{{ .Site.BaseURL }}" class="top">Top</a>
 		{{ if .Paginator.HasNext }}
-			<a href="{{ .Paginator.NextPage.URL }}" class="right arrow">→</a>
+			<a href="{{ .Paginator.NextPage.RelPermalink }}" class="right arrow">→</a>
 	
 		<span>{{ .Paginator.PageNumber }}</span>
 		{{ end }}
diff --git a/themes/tale-mod/layouts/partials/head.html b/themes/tale-mod/layouts/partials/head.html
@@ -1,46 +1,45 @@
 <head>
-    <meta charset="UTF-8">
+	<meta charset="UTF-8">
 		<meta name="viewport" content="width=device-width, initial-scale=1.0">
-		{{- if eq .URL "/" }}
+		{{- if eq .RelPermalink "/" }}
 			<meta name="description" content="{{ .Site.Params.Description }}">
 		{{- else if .Description }}
 			<meta name="description" content="{{ .Description }}">
 		{{- end }}
-	
+
 		<title>
-			{{- if eq .URL "/" }}
+			{{- if eq .RelPermalink "/" }}
 				{{ .Site.Title }}
 			{{- else }}
 				{{ .Title }} · {{ .Site.Title }}
 			{{- end }}
 		</title>
 
-        <script type="text/javascript">
-            if (window.location.href.indexOf("andersdamsgaard.dk") > -1) {
-                url=window.location.href;
-                url=url.replace("andersdamsgaard.dk","andersdamsgaard.com/da");
-                window.location.replace(url);
-            }
-        </script>
+		<script type="text/javascript">
+			if (window.location.href.indexOf("andersdamsgaard.dk") > -1) {
+				url=window.location.href;
+				url=url.replace("andersdamsgaard.dk","andersdamsgaard.com/da");
+				window.location.replace(url);
+			}
+		</script>
 
 		<!-- CSS -->
 		{{- $inServerMode	:= .Site.IsServer }}
 		{{- $cssTarget		:= "css/style.css" }}
 		{{- $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="{{ $style.RelPermalink }}">
 		<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700">
 		{{- $inServerMode	:= .Site.IsServer }}
 		{{- $style			:= resources.Get "css/w3.css" }}
-  		<link rel="stylesheet" href="{{ $style.RelPermalink }}">
+		<link rel="stylesheet" href="{{ $style.RelPermalink }}">
 
-	
 		<!-- Favicon -->
 		<link rel="icon" type="image/png" sizes="32x32" href="{{ .Site.BaseURL }}images/favicon-32x32.png">
 		<link rel="icon" type="image/png" sizes="16x16" href="{{ .Site.BaseURL }}images/favicon-16x16.png">
 		<link rel="apple-touch-icon" sizes="180x180" href="{{ .Site.BaseURL}}images/apple-touch-icon.png">
-	
+
 		<!-- RSS -->
-		<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
+		<link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
 	</head>
-	
+
diff --git a/themes/tale-mod/layouts/prints/list.html b/themes/tale-mod/layouts/prints/list.html
@@ -12,10 +12,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>