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