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"> <div class="container markdown top-pad">
{{ .Content }} {{ .Content }}
</div> </div>
<!-- Begin container -->
<div class="container"> <div class="container">
<ul> <ul>
{{ range .Pages.ByPublishDate }} {{ range .Pages.ByPublishDate.Reverse }}
<li> <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> </li>
{{ end }} {{ end }}
</ul> </ul>

View file

@ -8,9 +8,9 @@
{{ .Content }} {{ .Content }}
</article> </article>
<ul> <ul>
{{ range .Pages.ByPublishDate }} {{ range .Pages.ByPublishDate.Reverse }}
<li> <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> </li>
{{ end }} {{ end }}
</ul> </ul>

View file

@ -5,7 +5,7 @@
</article> </article>
<div class="section tags-list"> <div class="section tags-list">
{{ range $name, $taxonomy := .Site.Taxonomies.tags }} {{ 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 }} {{ end }}
</div> </div>
</div> </div>

View file

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

View file

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

View file

@ -1,5 +1,5 @@
{{ range .Pages.ByPublishDate.Reverse }} {{ range .Pages.ByPublishDate.Reverse }}
<li class="post-item"> <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> </li>
{{ end }} {{ end }}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -26,7 +26,7 @@
</figure> </figure>
</div> </div>
<div class="card-content has-text-centered top-pad"> <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 }} {{ .Title }}
</a> </a>
</div> </div>

View file

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