diff options
author | tdro <tdro@noreply.example.com> | 2023-03-03 17:34:06 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2023-03-03 18:48:17 -0500 |
commit | b0856bf1548a26c1c2924cc011f4a1ddc2707b5f (patch) | |
tree | 6449acc1cde1b7b2dbf463468e4e18e87fd1e83c /themes/default/layouts/_default/_markup/render-image.html | |
parent | 20355368f64f8d2889832db28e352f80bce18783 (diff) | |
download | canory-b0856bf1548a26c1c2924cc011f4a1ddc2707b5f.tar.gz canory-b0856bf1548a26c1c2924cc011f4a1ddc2707b5f.tar.bz2 canory-b0856bf1548a26c1c2924cc011f4a1ddc2707b5f.zip |
config: Support offline mode0.11.11
Default to offline. The configuration has to set the site's offline
configuration to false for remote fetches to be allowed
Diffstat (limited to 'themes/default/layouts/_default/_markup/render-image.html')
-rw-r--r-- | themes/default/layouts/_default/_markup/render-image.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/themes/default/layouts/_default/_markup/render-image.html b/themes/default/layouts/_default/_markup/render-image.html index 8f337ad..1a003fc 100644 --- a/themes/default/layouts/_default/_markup/render-image.html +++ b/themes/default/layouts/_default/_markup/render-image.html @@ -17,7 +17,7 @@ {{- $cached := and (fileExists (print "public/" $fileCache ".webp")) (fileExists (print "public/" $fileCache (path.Ext $source))) -}} {{- if not $cached -}} - {{- with $remote := resources.GetRemote $source -}} + {{- with $remote := cond (default true $.Page.Site.Params.site.offline) false (resources.GetRemote $source) -}} {{- with .Err -}} {{- if fileExists $public -}} {{- $local = resources.Get $public -}} |