Use relative links where possible
So the dead link checker can check internal links
This commit is contained in:
parent
901b516caf
commit
4540196dee
5 changed files with 8 additions and 8 deletions
|
@ -3,5 +3,5 @@
|
||||||
{{ end }}{{ end }}
|
{{ end }}{{ end }}
|
||||||
|
|
||||||
{{ if ne .page .current }}
|
{{ if ne .page .current }}
|
||||||
<li class="breadcrumb-item"><a href="{{ .page.Permalink }}">{{ .page.LinkTitle }}</a></li>
|
<li class="breadcrumb-item"><a href="{{ .page.RelPermalink }}">{{ .page.LinkTitle }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{{ .Scratch.Set "image" .Params.image }}
|
{{ .Scratch.Set "image" .Params.image }}
|
||||||
{{ if hasPrefix .Params.image "resource:" }}
|
{{ if hasPrefix .Params.image "resource:" }}
|
||||||
{{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }}
|
{{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }}
|
||||||
{{ .Scratch.Set "image" $resource.Permalink }}
|
{{ .Scratch.Set "image" $resource.RelPermalink }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="mb-3 image header-image" data-image='{{ .Scratch.Get "image" }}'></div>
|
<div class="mb-3 image header-image" data-image='{{ .Scratch.Get "image" }}'></div>
|
||||||
{{ end }}{{ end }}
|
{{ end }}{{ end }}
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
<div class="media list-page-item mb-3">
|
<div class="media list-page-item mb-3">
|
||||||
{{ if .Params.image }}
|
{{ if .Params.image }}
|
||||||
<div class="d-none d-md-block align-self-center img-wrapper mr-3">
|
<div class="d-none d-md-block align-self-center img-wrapper mr-3">
|
||||||
<a href="{{ .Permalink }}">
|
<a href="{{ .RelPermalink }}">
|
||||||
{{ .Scratch.Set "image" .Params.image }}
|
{{ .Scratch.Set "image" .Params.image }}
|
||||||
{{ if hasPrefix .Params.image "resource:" }}
|
{{ if hasPrefix .Params.image "resource:" }}
|
||||||
{{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }}
|
{{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }}
|
||||||
{{ .Scratch.Set "image" ($resource.Resize "300x").Permalink }}
|
{{ .Scratch.Set "image" ($resource.Resize "300x").RelPermalink }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="image" data-image='{{ .Scratch.Get "image" }}'></div>
|
<div class="image" data-image='{{ .Scratch.Get "image" }}'></div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<a href="{{ .Permalink }}">
|
<a href="{{ .RelPermalink }}">
|
||||||
<h5 class="my-0">{{ .Title }}</h5>
|
<h5 class="my-0">{{ .Title }}</h5>
|
||||||
</a>
|
</a>
|
||||||
<small>{{ partial "content-details.html" . }}</small>
|
<small>{{ partial "content-details.html" . }}</small>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
{{ range sort $nav_pages "LinkTitle" }}
|
{{ range sort $nav_pages "LinkTitle" }}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{{ .Permalink }}" class="nav-link">
|
<a href="{{ .RelPermalink }}" class="nav-link">
|
||||||
<code>~/{{ urlize .LinkTitle }}</code>
|
<code>~/{{ urlize .LinkTitle }}</code>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -18,11 +18,11 @@
|
||||||
|
|
||||||
{{ if .Inner }}
|
{{ if .Inner }}
|
||||||
<figure>
|
<figure>
|
||||||
<img src="{{ $image.Permalink }}" class='{{ .Get "class" }}' />
|
<img src="{{ $image.RelPermalink }}" class='{{ .Get "class" }}' />
|
||||||
<figcaption>
|
<figcaption>
|
||||||
<small>{{ .Inner }}</small>
|
<small>{{ .Inner }}</small>
|
||||||
</figcaption>
|
</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<img src="{{ $image.Permalink }}" class='{{ .Get "class" }}' />
|
<img src="{{ $image.RelPermalink }}" class='{{ .Get "class" }}' />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue