prefer rel over abs
This commit is contained in:
parent
27dbcc6dd9
commit
a86462deb4
|
@ -13,7 +13,7 @@
|
|||
{{ range .Pages.ByPublishDate.Reverse }}
|
||||
<li>
|
||||
<h2>
|
||||
<a href="{{ .Permalink }}">
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<svg
|
||||
class="bookmark"
|
||||
aria-hidden="true"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
{{ hugo.Generator }}
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<link rel="canonical" href="{{ .RelPermalink }}">
|
||||
|
||||
{{ if .IsHome }}
|
||||
{{ with .Site.Params.homeMetaContent }}
|
||||
|
@ -27,14 +27,14 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" href="{{ "css/prism.css" | absURL }}" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="{{ "css/prism.css" | relURL }}" media="none" onload="this.media='all';">
|
||||
|
||||
{{ $templateStyles := resources.Get "css/template-styles.css" }}
|
||||
{{ $styles := $templateStyles | resources.ExecuteAsTemplate "css/styles.css" . }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ $styles.Permalink }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ $styles.RelPermalink }}">
|
||||
|
||||
{{ range .Site.Params.customCss }}
|
||||
<link rel="stylesheet" href="{{ . | absURL }}">
|
||||
<link rel="stylesheet" href="{{ . | relURL }}">
|
||||
{{ end }}
|
||||
|
||||
{{ $title := print .Title " | " .Site.Title }}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
href="{{ .Site.BaseURL }}"
|
||||
aria-label="{{ .Site.Title }} home page"
|
||||
>
|
||||
<img src="{{ "images/logo.svg" | absURL }}" alt="">
|
||||
<img src="{{ "images/logo.svg" | relURL }}" alt="">
|
||||
</a>
|
||||
<p class="library-desc">
|
||||
{{ with .Site.Params.description }} {{ . | markdownify }} {{ end }}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{{ $templateDomScripts := resources.Get "js/template-dom-scripts.js" }}
|
||||
{{ $domScripts := $templateDomScripts | resources.ExecuteAsTemplate "js/dom-scripts.js" . }}
|
||||
<script src="{{ $domScripts.Permalink }}"></script>
|
||||
<script src="{{ $domScripts.RelPermalink }}"></script>
|
||||
|
||||
<script src="{{ "js/prism.js" | absURL }}"></script>
|
||||
<script src="{{ "js/prism.js" | relURL }}"></script>
|
||||
|
||||
{{ if site.Params.search }}
|
||||
{{ $searchJs := resources.Get "js/search.js" | fingerprint }}
|
||||
|
@ -12,5 +12,5 @@
|
|||
{{ end }}
|
||||
|
||||
{{ range .Site.Params.customJs }}
|
||||
<script src="{{ . | absURL }}"></script>
|
||||
<script src="{{ . | relURL }}"></script>
|
||||
{{ end }}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<svg class="tag-icon" aria-hidden="true" viewBox="0 0 177.16535 177.16535" focusable="false">
|
||||
<use xlink:href="#tag"></use>
|
||||
</svg>
|
||||
{{ $href := print ("tags/" | absLangURL) (. | urlize) "/" }}
|
||||
{{ $href := print ("tags/" | relLangURL) (. | urlize) "/" }}
|
||||
<a href="{{ $href }}">{{ . }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
{{ end }}
|
||||
|
||||
<figure role="group" aria-describedby="caption-{{ $caption | md5 }}">
|
||||
<a href="{{ $original.Permalink }}" class="img-link">
|
||||
<img src="{{ $new.Permalink }}">
|
||||
<a href="{{ $original.RelPermalink }}" class="img-link">
|
||||
<img src="{{ $new.RelPermalink }}">
|
||||
</a>
|
||||
<figcaption id="caption-{{ $caption | md5 }}">
|
||||
{{ $caption | markdownify }}
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
{{ end }}
|
||||
|
||||
<div class="gallery">
|
||||
<a href="{{ $original.Permalink }}" class="img-link">
|
||||
<img src="{{ $new.Permalink }}">
|
||||
<a href="{{ $original.RelPermalink }}" class="img-link">
|
||||
<img src="{{ $new.RelPermalink }}">
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
{{ $browser := index $browser 0 }}
|
||||
{{ $version := findRE "[0-9]+$" . }}
|
||||
{{ $slug := replace $browser " " "-" | lower }}
|
||||
<img src="{{ (printf "images/browser-%s" $slug) | absURL }}.svg" alt="">
|
||||
<img src="{{ (printf "images/browser-%s" $slug) | relURL }}.svg" alt="">
|
||||
<span><strong>{{ $browser }} {{ index $version 0 }}</strong></span>
|
||||
{{ if in . "+" }}
|
||||
{{ $parts := split . "+" }}
|
||||
|
|
Loading…
Reference in New Issue
Block a user