diff options
Diffstat (limited to 'themes/default/layouts/shortcodes/attach.html')
-rw-r--r-- | themes/default/layouts/shortcodes/attach.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/themes/default/layouts/shortcodes/attach.html b/themes/default/layouts/shortcodes/attach.html index c122d75..f453da5 100644 --- a/themes/default/layouts/shortcodes/attach.html +++ b/themes/default/layouts/shortcodes/attach.html @@ -13,7 +13,7 @@ {{- $notCached := not (fileExists (path.Join "public/" $fileCache)) -}} {{- if $notCached -}} - {{- with $remote := resources.GetRemote $url -}} + {{- with $remote := cond (default true $.Page.Site.Params.site.offline) false (resources.GetRemote $url) -}} {{- with .Err -}} {{- warnf "Attachment fetch %s" . -}} {{- if not (fileExists $fileCache) -}} @@ -25,7 +25,7 @@ {{- $cache = $cache.Permalink -}} {{- end -}} {{- else -}} - {{- $caption = "No remote attachment data found for source" -}} + {{- $caption = "Unable to load remote source data" -}} {{- end -}} {{- else -}} {{- with $cache = resources.Get (path.Join "public/" $fileCache) -}} @@ -35,7 +35,7 @@ {{- end -}} {{- end -}} -{{- $data := $cache -}} +{{- $data := or $cache $url -}} {{- if $remote -}} {{- $data = $url -}} |