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 | |
parent | ecc11a8c4efd4947c9dcab59612d5ac032270c55 (diff) |
Remove /images/ from image urls so that any folder can be used.
-rw-r--r-- | .tern-project | 7 | ||||
-rw-r--r-- | exampleSite/content/posts/2013-08-16-code-highlighting-post.md | 4 | ||||
-rw-r--r-- | layouts/_default/list.html | 4 | ||||
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/partials/head.html | 2 |
5 files changed, 13 insertions, 6 deletions
diff --git a/.tern-project b/.tern-project new file mode 100644 index 0000000..22bd8f4 --- /dev/null +++ b/.tern-project @@ -0,0 +1,7 @@ +{ + "ecmaVersion": 6, + "libs": [ + "browser" + ], + "plugins": {} +}
\ No newline at end of file diff --git a/exampleSite/content/posts/2013-08-16-code-highlighting-post.md b/exampleSite/content/posts/2013-08-16-code-highlighting-post.md index 521d9ad..6530ce0 100644 --- a/exampleSite/content/posts/2013-08-16-code-highlighting-post.md +++ b/exampleSite/content/posts/2013-08-16-code-highlighting-post.md @@ -5,7 +5,7 @@ description: "Demo post displaying the various ways of highlighting code in Mark lastmod: 2016-06-01T15:27:45-04:00 tags: [sample post, code, highlighting] image: - feature: abstract-10.jpg + feature: /images/abstract-10.jpg credit: dargadgetz creditlink: http://www.dargadgetz.com/ios-7-abstract-wallpaper-pack-for-iphone-5-and-ipod-touch-retina/ --- @@ -117,4 +117,4 @@ end An example of a Gist embed below. -<script src="https://gist.github.com/mmistakes/43a355923921d22cd993.js"></script>
\ No newline at end of file +<script src="https://gist.github.com/mmistakes/43a355923921d22cd993.js"></script> 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> |