diff options
author | Göran S <support@appernetic.io> | 2018-08-31 16:35:02 +0300 |
---|---|---|
committer | Göran S <support@appernetic.io> | 2018-08-31 16:35:02 +0300 |
commit | e21fa2492ed7fc58ab954d311f83339ea5fb50cb (patch) | |
tree | 50043cf03dc19225622ea4080976dc09ddc09680 | |
parent | a5dfa157e83a55970d49ddd2bfa40c35d8c708b6 (diff) |
Add default seeting for image folder
-rw-r--r-- | exampleSite/config.toml | 4 | ||||
-rw-r--r-- | layouts/_default/single.html | 2 | ||||
-rw-r--r-- | layouts/partials/category.html | 2 | ||||
-rw-r--r-- | layouts/partials/portfolio.html | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index bfe0c90..b1d47f9 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -10,6 +10,8 @@ preserveTaxonomyNames = true paginate = 5 #frontpage pagination [params] + # Unmark to use post folder for images. Default is static folder. + #usepostimgfolder = true slogan = "A fast & secure theme" description = "Describe your website" # meta description author = "Göran Svensson" @@ -64,4 +66,4 @@ paginate = 5 #frontpage pagination instagram = "full profile url in instagram" github = "full profile url in github" pinterest = "full profile url in pinterest" - rss = true
\ No newline at end of file + rss = true diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7c9d6d4..80172d8 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -9,7 +9,7 @@ {{ if and (isset .Params "image") .Params.image }} <div class="post type-post status-publish format-standard has-post-thumbnail hentry category-design tag-design tag-standard-2 tag-tagalicious tag-travel entry full-without-featured odd excerpt-1"> - <div class='featured-image lazy lazy-bg-image' data-background="{{ .Permalink }}{{ .Params.image }}"> + <div class='featured-image lazy lazy-bg-image' {{ if isset .Site.Params "usepostimgfolder" }} data-background="{{ .Permalink }}{{ .Params.image }}"{{ else }} data-background="{{ .Params.image | absURL }}"{{ end }}> </div> {{ else }} diff --git a/layouts/partials/category.html b/layouts/partials/category.html index 40c994e..ac014c3 100644 --- a/layouts/partials/category.html +++ b/layouts/partials/category.html @@ -24,7 +24,7 @@ {{ end }} {{ if and (isset .Params "image") .Params.image }} - <a class="featured-image-link" href="{{ .Permalink }}"><div class='featured-image lazy lazy-bg-image' data-background="{{ .Permalink }}{{ .Params.image }}"></div></a> + <a class="featured-image-link" href="{{ .Permalink }}"><div class='featured-image lazy lazy-bg-image' {{if isset .Site.Params "usepostimgfolder"}}data-background="{{ .Permalink }}{{ .Params.image }}"{{ else }}data-background="{{ .Params.image | absURL }}"{{ end }}></div></a> {{ end }} <div class="excerpt-container"> diff --git a/layouts/partials/portfolio.html b/layouts/partials/portfolio.html index 42a8650..5dddbb3 100644 --- a/layouts/partials/portfolio.html +++ b/layouts/partials/portfolio.html @@ -16,7 +16,7 @@ {{ end }} {{ if and (isset .Params "image") .Params.image }} - <a class="featured-image-link" href="{{ .Permalink }}"><div class='featured-image lazy lazy-bg-image' data-background="{{ .Permalink }}{{ .Params.image }}"></div></a> + <a class="featured-image-link" href="{{ .Permalink }}"><div class='featured-image lazy lazy-bg-image' {{if isset .Site.Params "usepostimgfolder"}}data-background="{{ .Permalink }}{{ .Params.image }}"{{ else }}data-background="{{ .Params.image | absURL }}"{{ end }}></div></a> {{ end }} <div class="excerpt-container"> |