1
Fork 0

Use relative links where possible

So the dead link checker can check internal links
This commit is contained in:
Jake Howard 2018-02-04 13:08:48 +00:00
parent 901b516caf
commit 4540196dee
Signed by: jake
GPG key ID: 57AFB45680EDD477
5 changed files with 8 additions and 8 deletions

View file

@ -3,5 +3,5 @@
{{ end }}{{ end }}
{{ 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 }}

View file

@ -2,7 +2,7 @@
{{ .Scratch.Set "image" .Params.image }}
{{ if hasPrefix .Params.image "resource:" }}
{{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }}
{{ .Scratch.Set "image" $resource.Permalink }}
{{ .Scratch.Set "image" $resource.RelPermalink }}
{{ end }}
<div class="mb-3 image header-image" data-image='{{ .Scratch.Get "image" }}'></div>
{{ end }}{{ end }}

View file

@ -1,18 +1,18 @@
<div class="media list-page-item mb-3">
{{ if .Params.image }}
<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 }}
{{ if hasPrefix .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 }}
<div class="image" data-image='{{ .Scratch.Get "image" }}'></div>
</a>
</div>
{{ end }}
<div class="media-body">
<a href="{{ .Permalink }}">
<a href="{{ .RelPermalink }}">
<h5 class="my-0">{{ .Title }}</h5>
</a>
<small>{{ partial "content-details.html" . }}</small>

View file

@ -6,7 +6,7 @@
{{ range sort $nav_pages "LinkTitle" }}
<li class="nav-item">
<a href="{{ .Permalink }}" class="nav-link">
<a href="{{ .RelPermalink }}" class="nav-link">
<code>~/{{ urlize .LinkTitle }}</code>
</a>
</li>

View file

@ -18,11 +18,11 @@
{{ if .Inner }}
<figure>
<img src="{{ $image.Permalink }}" class='{{ .Get "class" }}' />
<img src="{{ $image.RelPermalink }}" class='{{ .Get "class" }}' />
<figcaption>
<small>{{ .Inner }}</small>
</figcaption>
</figure>
{{ else }}
<img src="{{ $image.Permalink }}" class='{{ .Get "class" }}' />
<img src="{{ $image.RelPermalink }}" class='{{ .Get "class" }}' />
{{ end }}