mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-22 03:42:53 +00:00
Use abs URL every time
This commit is contained in:
parent
ef5feab3ef
commit
8c258bbd07
14 changed files with 26 additions and 26 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 }} ({{ len $taxonomy }})</a>
|
||||
<a class="tag-cloud" href="{{"tags/" | absLangURL }}{{ $name | urlize }}">{{ lower $name }} ({{ len $taxonomy }})</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -12,5 +12,5 @@
|
|||
|
||||
<!-- Custom css -->
|
||||
{{ range .Site.Params.customCSS -}}
|
||||
<link rel="stylesheet" href="{{ . | relURL }}">
|
||||
<link rel="stylesheet" href="{{ . | absURL }}">
|
||||
{{- end }}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{{ with .Site.Params.favicon }}
|
||||
<link rel="shortcut icon" href="{{ . | relURL }}">
|
||||
<link rel="shortcut icon" href="{{ . | absURL }}">
|
||||
{{ end }}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 }}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue