Use abs URL every time

This commit is contained in:
Hanzei 2018-07-20 17:27:32 +02:00
parent ef5feab3ef
commit 8c258bbd07
No known key found for this signature in database
GPG key ID: 69A2DEFD98937BA0
14 changed files with 26 additions and 26 deletions

View file

@ -2,12 +2,11 @@
<div class="container markdown top-pad">
{{ .Content }}
</div>
<!-- Begin container -->
<div class="container">
<ul>
{{ range .Pages.ByPublishDate }}
{{ range .Pages.ByPublishDate.Reverse }}
<li>
<a href="{{.Permalink}}">{{.Date.Format (.Site.Params.dateform | default "Jan 02, 2006") }} | {{.Title}}</a>
<a href="{{ .Permalink }}">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} | {{ .Title }}</a>
</li>
{{ end }}
</ul>

View file

@ -8,9 +8,9 @@
{{ .Content }}
</article>
<ul>
{{ range .Pages.ByPublishDate }}
{{ range .Pages.ByPublishDate.Reverse }}
<li>
<a href="{{.Permalink}}">{{.Date.Format (.Site.Params.dateform | default "Jan 02, 2006") }} | {{.Title}}</a>
<a href="{{ .Permalink }}">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} | {{ .Title }}</a>
</li>
{{ end }}
</ul>

View file

@ -5,7 +5,7 @@
</article>
<div class="section tags-list">
{{ range $name, $taxonomy := .Site.Taxonomies.tags }}
<a class="tag-cloud" href="{{"tags/" | relLangURL }}{{ $name | urlize }}">{{ lower $name }}&nbsp;({{ len $taxonomy }})</a>
<a class="tag-cloud" href="{{"tags/" | absLangURL }}{{ $name | urlize }}">{{ lower $name }}&nbsp;({{ len $taxonomy }})</a>
{{ end }}
</div>
</div>

View file

@ -8,14 +8,14 @@
{{ range first 1 .Pages.ByPublishDate.Reverse }}
<div class="summary">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}
<h3 class="title is-3 strong-post-title">
<a href="{{ .RelPermalink }}">
<a href="{{ .Permalink }}">
{{ .Title }}
</a>
</h3>
<div class="markdown">
{{ .Summary }}
{{ if .Truncated }}
<a href="{{ .RelPermalink }}">{{ i18n "index_blog_readMore" . }}</a>
<a href="{{ .Permalink }}">{{ i18n "index_blog_readMore" . }}</a>
{{ end }}
</div>
</div>

View file

@ -51,7 +51,7 @@
<div class="column is-one-third has-text-centered">
{{ with $home.Resources.GetMatch .Params.Image }}
{{ with .Resize "320x" }}
<img class="img-responsive avatar" src="{{ .RelPermalink }}" alt="{{ .Name }}">
<img class="img-responsive avatar" src="{{ .Permalink }}" alt="{{ .Name }}">
{{ end }}
{{ end }}
</div>

View file

@ -1,5 +1,5 @@
{{ range .Pages.ByPublishDate.Reverse }}
<li class="post-item">
<span><a href="{{ .Permalink }}">{{ .Title }}</a></span> - <span>{{ .Date.Format (.Site.Params.dateform | default "Jan 02, 2006") }}</span>
<span><a href="{{ .Permalink }}">{{ .Title }}</a></span> - <span>{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}</span>
</li>
{{ end }}

View file

@ -12,5 +12,5 @@
<!-- Custom css -->
{{ range .Site.Params.customCSS -}}
<link rel="stylesheet" href="{{ . | relURL }}">
<link rel="stylesheet" href="{{ . | absURL }}">
{{- end }}

View file

@ -1,3 +1,3 @@
{{ with .Site.Params.favicon }}
<link rel="shortcut icon" href="{{ . | relURL }}">
<link rel="shortcut icon" href="{{ . | absURL }}">
{{ end }}

View file

@ -6,12 +6,12 @@
{{ with .Resources.ByType "image" }}
{{ range first 5 (sort . "Params.weight") }}
<meta property="og:image" content="{{ .RelPermalink }}"/>
<meta property="og:image" content="{{ .Permalink }}"/>
{{ end }}
{{ else }}
{{ with .Site.GetPage "page" "home" }}
{{ range first 5 (.Resources.ByType "image") }}
<meta property="og:image" content="{{ .RelPermalink }}"/>
<meta property="og:image" content="{{ .Permalink }}"/>
{{ end }}
{{ end }}
{{ end }}

View file

@ -6,11 +6,11 @@
<h2 class="title is-2 has-text-centered">{{ i18n "index_blog_latestPosts" . }}</h2>
{{ range first 1 .Pages.ByPublishDate.Reverse }}
<div class="summary">{{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }}
<h3 class="title is-3 latest-post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
<h3 class="title is-3 latest-post-title"><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
<div class="markdown">
{{ .Summary }}
{{ if .Truncated }}
<a href="{{ .RelPermalink }}">{{ i18n "index_blog_readMore" . }}</a>
<a href="{{ .Permalink }}">{{ i18n "index_blog_readMore" . }}</a>
{{ end }}
</div>
</div>
@ -21,7 +21,7 @@
{{ partialCached "blog/li.html" . }}
{{ else }}
<div class="container has-text-centered top-pad">
<a href="{{ .RelPermalink }}">{{ i18n "index_blog_allPosts" . }}</a>
<a href="{{ .Permalink }}">{{ i18n "index_blog_allPosts" . }}</a>
</div>
{{ end }}
</div>

View file

@ -30,6 +30,7 @@
</div>
<div class="card-content has-text-centered top-pad">
<a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}>
{{ .Params.external_link }}
{{ .Title }}
</a>
</div>
@ -40,7 +41,7 @@
</div>
{{ if lt $numberOfProjectsToShow $totalProjects }}
<div class="container has-text-centered top-pad">
<a href="{{ .RelPermalink }}">{{ i18n "index_projects_allProjects" . }}</a>
<a href="{{ .Permalink }}">{{ i18n "index_projects_allProjects" . }}</a>
</div>
{{ end }}
</div>
@ -67,7 +68,7 @@
{{ if $moreThenOneImage }}
<div class="item owl-height">
{{ end }}
<img src="{{ $image.RelPermalink }}" class="img-responsive" alt="{{ $image.Name }}">
<img src="{{ $image.Permalink }}" class="img-responsive" alt="{{ $image.Name }}">
{{ if $moreThenOneImage }}
</div>
{{ end }}

View file

@ -37,13 +37,13 @@
{{ else }}
<!-- use default menu -->
{{ if not $isHome }}
<a class="navbar-item" href="{{ "/" | relLangURL }}">{{ i18n "nav_main" . }}</a>
<a class="navbar-item" href="{{ "/" | absLangURL }}">{{ i18n "nav_main" . }}</a>
{{ end }}
{{ with .Site.GetPage "page" "home" }}
{{ range sort (.Resources.ByType "page") "Params.weight" }}
{{ if ne .Name "contact.md" }}
<a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" .File.TranslationBaseName | relLangURL }}{{ end }}">{{ .Title }}</a>
<a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" .File.TranslationBaseName | absLangURL }}{{ end }}">{{ .Title }}</a>
{{ end }}
{{ end }}
{{ end }}
@ -54,7 +54,7 @@
{{ if $isHome }}
<a class="navbar-item" href="#{{ .Title | urlize }}">{{ .Title }}</a>
{{ else }}
<a class="navbar-item" href="{{ .RelPermalink }}">
<a class="navbar-item" href="{{ .Permalink }}">
{{ if $pageIsInProjects }}
{{ i18n "nav_backToSection" . }}
{{ else }}
@ -71,7 +71,7 @@
{{ if $isHome }}
<a class="navbar-item" href="#{{ .Title | urlize }}">{{ .Title }}</a>
{{ else }}
<a class="navbar-item" href="{{ .RelPermalink }}">
<a class="navbar-item" href="{{ .Permalink }}">
{{ if $pageIsInBlog }}
Back to {{ .Title | singularize}}
{{ else }}
@ -84,7 +84,7 @@
{{ with .Site.GetPage "page" "home" }}
{{ with .Resources.GetMatch "contact.md" }}
<a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" .File.TranslationBaseName | relLangURL }}{{ end }}">{{ .Title }}</a>
<a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "/#%s" .File.TranslationBaseName | absLangURL }}{{ end }}">{{ .Title }}</a>
{{ end }}
{{ end }}

View file

@ -26,7 +26,7 @@
</figure>
</div>
<div class="card-content has-text-centered top-pad">
<a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{.Permalink}}{{ end }}">
<a href="{{ if .Params.external_link }}{{ .Params.external_link }}{{ else }}{{ .Permalink }}{{ end }}">
{{ .Title }}
</a>
</div>

View file

@ -11,7 +11,7 @@
{{ if $moreThenOneImage }}
<div class="item owl-height">
{{ end }}
<img src="{{ $image.RelPermalink }}" class="img-responsive" alt="{{ $image.Name }}">
<img src="{{ $image.Permalink }}" class="img-responsive" alt="{{ $image.Name }}">
{{ if $moreThenOneImage }}
</div>
{{ end }}