Skip to content
Snippets Groups Projects
Commit d6b86105 authored by Martyn Welch's avatar Martyn Welch Committed by Martyn Welch
Browse files

Remove deprecated usage of ".Page.URL" in theme


The current theme uses ".URL" in a number of places that is resulting in
the current warning message:

    Page.URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url

Update the usage of this variable to ".Permalink" to stop the warning
messages being produced.

Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
parent 22a70d1a
No related branches found
No related tags found
1 merge request!219Review of concept documents
......@@ -63,12 +63,12 @@
<ul class="pager main-pager">
{{ if .Paginator.HasPrev }}
<li class="previous">
<a href="{{ .URL }}page/{{ .Paginator.Prev.PageNumber }}">&larr; {{ i18n "newerPosts" }}</a>
<a href="{{ .Permalink }}page/{{ .Paginator.Prev.PageNumber }}">&larr; {{ i18n "newerPosts" }}</a>
</li>
{{ end }}
{{ if .Paginator.HasNext }}
<li class="next">
<a href="{{ .URL }}page/{{ .Paginator.Next.PageNumber }}">{{ i18n "olderPosts" }} &rarr;</a>
<a href="{{ .Permalink }}page/{{ .Paginator.Next.PageNumber }}">{{ i18n "olderPosts" }} &rarr;</a>
</li>
{{ end }}
</ul>
......
......@@ -46,12 +46,12 @@
<ul class="pager main-pager">
{{ if .Paginator.HasPrev }}
<li class="previous">
<a href="{{ .URL }}page/{{ .Paginator.Prev.PageNumber }}">&larr; {{ i18n "newerPosts" }}</a>
<a href="{{ .Permalink }}page/{{ .Paginator.Prev.PageNumber }}">&larr; {{ i18n "newerPosts" }}</a>
</li>
{{ end }}
{{ if .Paginator.HasNext }}
<li class="next">
<a href="{{ .URL }}page/{{ .Paginator.Next.PageNumber }}">{{ i18n "olderPosts" }} &rarr;</a>
<a href="{{ .Permalink }}page/{{ .Paginator.Next.PageNumber }}">{{ i18n "olderPosts" }} &rarr;</a>
</li>
{{ end }}
</ul>
......
......@@ -30,13 +30,13 @@
{{- with .Site.Params.fb_app_id }}
<meta property="fb:app_id" content="{{ . }}" />
{{- end }}
<meta property="og:url" content="{{ .URL | absLangURL }}" />
<meta property="og:url" content="{{ .Permalink | absLangURL }}" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="{{ .Site.Title }}" />
<!-- Hugo Version number -->
{{ hugo.Generator -}}
<!-- Links and stylesheets -->
<link rel="canonical" href="{{ .URL | absLangURL }}" />
<link rel="canonical" href="{{ .Permalink | absLangURL }}" />
<link rel="alternate" href="{{ "index.xml" | absLangURL }}" type="application/rss+xml" title="{{ .Site.Title }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.css" integrity="sha384-wITovz90syo1dJWVh32uuETPVEtGigN07tkttEqPv+uR2SE/mbQcG7ATL28aI9H0" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
......
......@@ -80,13 +80,13 @@
{{ $section := .FirstSection }}
{{ range sort .Site.Sections.ByTitle }}
<li class="sidebar-section">
<a href="{{ .URL | relLangURL }}"
<a href="{{ .Permalink | relLangURL }}"
{{ if eq .FirstSection $section }}id="sidebar-focus" class="sidebar-focus"{{end}}>{{ .Title }}</a>
<div class="sidebar-pages">
<ul>
{{ range .Pages.ByTitle }}
<li class="sidebar-page">
<a href="{{ .URL | relLangURL }}">{{ .Name }}</a>
<a href="{{ .Permalink | relLangURL }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment