Make all links absolute so they respect the base URL
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
{{ if isset .Params "featuredimage" }}
|
{{ if isset .Params "featuredimage" }}
|
||||||
<div class="card-img-container">
|
<div class="card-img-container">
|
||||||
<p class="card-img-overlay">Next Article</p>
|
<p class="card-img-overlay">Next Article</p>
|
||||||
<img src="{{.Params.featuredimage }}" class="card-img">
|
<img src="{{.Params.featuredimage | absURL }}" class="card-img">
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<article class="card-body">
|
<article class="card-body">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
href="{{ .Permalink }}" class="card blog-card" rel="bookmark" >
|
href="{{ .Permalink }}" class="card blog-card" rel="bookmark" >
|
||||||
{{ if isset .Params "featuredimage" }}
|
{{ if isset .Params "featuredimage" }}
|
||||||
<div class="card-img-container">
|
<div class="card-img-container">
|
||||||
<img src="{{.Params.featuredimage }}" class="card-img">
|
<img src="{{.Params.featuredimage | absURL }}" class="card-img">
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<article class="card-body">
|
<article class="card-body">
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</header>
|
</header>
|
||||||
{{ if isset .Params "featuredimage" }}
|
{{ if isset .Params "featuredimage" }}
|
||||||
<figure class="post-figure">
|
<figure class="post-figure">
|
||||||
<img src="{{.Params.featuredimage }}">
|
<img src="{{.Params.featuredimage | absURL }}">
|
||||||
</figure>
|
</figure>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|||||||
@@ -6,21 +6,21 @@
|
|||||||
<meta name="description" content="{{if .IsHome}}{{ $.Site.Params.description }}{{else}}{{.Description}}{{end}}" />
|
<meta name="description" content="{{if .IsHome}}{{ $.Site.Params.description }}{{else}}{{.Description}}{{end}}" />
|
||||||
<!-- Standard favicon -->
|
<!-- Standard favicon -->
|
||||||
{{ if (fileExists "static/img/favicon.ico") -}}
|
{{ if (fileExists "static/img/favicon.ico") -}}
|
||||||
<link rel="icon" type="image/x-icon" href="/img/favicon.ico">
|
<link rel="icon" type="image/x-icon" href="{{ "/img/favicon.ico" | absURL}}">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<!-- Recommended favicon format -->
|
<!-- Recommended favicon format -->
|
||||||
{{ if (fileExists "static/img/favicon.png") -}}
|
{{ if (fileExists "static/img/favicon.png") -}}
|
||||||
<link rel="icon" type="image/png" href="/img/favicon.png">
|
<link rel="icon" type="image/png" href="{{ "/img/favicon.png" | absURL}}">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.min.css" />
|
||||||
<link rel="stylesheet" href="/css/style.css" />
|
<link rel="stylesheet" href="{{ "/css/style.css" | absURL}}" />
|
||||||
<link rel="stylesheet" href="/css/xcode.css" />
|
<link rel="stylesheet" href="{{ "/css/xcode.css" | absURL}}" />
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.css" integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.css" integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y" crossorigin="anonymous">
|
||||||
<link rel="stylesheet" href="/css/latolatinfonts.css" />
|
<link rel="stylesheet" href="{{ "/css/latolatinfonts.css" | absURL}}" />
|
||||||
{{ if isset $.Site.Params "bgimg" }}
|
{{ if isset $.Site.Params "bgimg" }}
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background: #ecedef url("{{ $.Site.Params.bgimg | safeCSS }}") repeat;
|
background: #ecedef url("{{ $.Site.Params.bgimg | absURL | safeCSS }}") repeat;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<a ontouchstart="cardPressed.call(this)" ontouchend="cardReleased.call(this)" ontouchmove="cardReleased.call(this)"
|
<a ontouchstart="cardPressed.call(this)" ontouchend="cardReleased.call(this)" ontouchmove="cardReleased.call(this)"
|
||||||
href="/" class="card home-card" style="background-image: url({{if isset .Site.Params "homeimg"}} {{ .Site.Params.homeimg | safeCSS }} {{ else }} /img/grey-cloud.jpg {{ end }})" rel="bookmark" >
|
href="/" class="card home-card" style="background-image: url({{if isset .Site.Params "homeimg"}} {{ .Site.Params.homeimg | absURL | safeCSS }} {{ else }} /img/grey-cloud.jpg | absURL {{ end }} )" rel="bookmark" >
|
||||||
Home
|
Home
|
||||||
</a>
|
</a>
|
||||||
@@ -12,12 +12,12 @@
|
|||||||
<span></span>
|
<span></span>
|
||||||
</button>
|
</button>
|
||||||
<ul id="menu" class="hamburger-menu-overlay">
|
<ul id="menu" class="hamburger-menu-overlay">
|
||||||
<li><a href="/" class="hamburger-menu-overlay-link">Home</a></li>
|
<li><a href="{{ .Site.BaseURL }}" class="hamburger-menu-overlay-link">Home</a></li>
|
||||||
{{ range where .Site.Pages "Params.displayinmenu" true }}
|
{{ range where .Site.Pages "Params.displayinmenu" true }}
|
||||||
<li><a href="{{ .Permalink }}" class="hamburger-menu-overlay-link">{{ .Title }}</a></li>
|
<li><a href="{{ .Permalink }}" class="hamburger-menu-overlay-link">{{ .Title }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ range $key, $value := .Site.Taxonomies.categories }}
|
{{ range $key, $value := .Site.Taxonomies.categories }}
|
||||||
<li><a href="/categories/{{ $key | urlize }}" class="hamburger-menu-overlay-link">{{ $key | humanize }}</a></li>
|
<li><a href="{{ (printf "%s%s" "/categories/" ($key | urlize)) | absURL }}" class="hamburger-menu-overlay-link">{{ $key | humanize }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user