diff options
author | Durand D'souza <durand1@gmail.com> | 2016-10-05 14:31:12 +0300 |
---|---|---|
committer | Durand D'souza <durand1@gmail.com> | 2016-10-05 14:31:12 +0300 |
commit | 1ba272b73b475f6968caf1b2e1d58dfeca3e6d67 (patch) | |
tree | ed7cf771614a319c345d52aad762ba9914ec2fb5 /layouts | |
parent | ecc11a8c4efd4947c9dcab59612d5ac032270c55 (diff) |
Remove /images/ from image urls so that any folder can be used.
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/list.html | 4 | ||||
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/partials/head.html | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 2a11c88..b376cb1 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -6,7 +6,7 @@ {{ $imageparams := index ($.Scratch.Get "Params") "image" }} {{ if $imageparams.credit }}<div class="image-credit">Image source: <a href="{{ $imageparams.creditlink }}">{{ $imageparams.credit }}</a></div><!-- /.image-credit -->{{ end }} <div class="entry-image"> - <img src="{{ .Site.BaseURL }}/images/{{ $imageparams.feature }}" alt="{{ .Title }}"> + <img src="{{ .Site.BaseURL }}{{ $imageparams.feature }}" alt="{{ .Title }}"> </div><!-- /.entry-image --> {{ end }} <div class="header-title"> @@ -34,7 +34,7 @@ <header> {{ if .Params.image.feature }} <div class="entry-image-index"> - <a href="{{ .Permalink }}" title="{{ .Title }}"><img src="{{ .Site.BaseURL }}/images/{{ .Params.image.feature }}" alt="{{ .Title }}"></a> + <a href="{{ .Permalink }}" title="{{ .Title }}"><img src="{{ .Site.BaseURL }}{{ .Params.image.feature }}" alt="{{ .Title }}"></a> </div><!-- /.entry-image --> {{ end }} <div class="entry-meta"> diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 45eee5d..549d709 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -6,7 +6,7 @@ {{ $imageparams := index ($.Scratch.Get "Params") "image" }} {{ if $imageparams.credit }}<div class="image-credit">Image credit: <a {{ with $imageparams.creditlink }}href="{{ . }}"{{ end }}>{{ $imageparams.credit }}</a></div><!-- /.image-credit -->{{ end }} <div class="entry-image"> - <img src="{{ .Site.BaseURL }}/images/{{ $imageparams.feature }}" alt="{{ .Title }}"> + <img src="{{ .Site.BaseURL }}{{ $imageparams.feature }}" alt="{{ .Title }}"> </div><!-- /.entry-image --> </div><!-- /.entry-header --> {{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index f8da399..b7edc5b 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -48,6 +48,6 @@ {{ $.Scratch.Set "Params" .Params }} {{ end }} {{ with .Params.background }} -<style type="text/css">body {background-image:url({{ . | absURL }});}</style> +<style type="text/css">body {background-image:url({{ $.Site.BaseURL }}{{ . }});}</style> {{ end }} </head> |