diff --git a/themes/red/layouts/_default/_markup/render-image.html b/themes/red/layouts/_default/_markup/render-image.html index 09ec5c7..0c50804 100644 --- a/themes/red/layouts/_default/_markup/render-image.html +++ b/themes/red/layouts/_default/_markup/render-image.html @@ -2,8 +2,10 @@ {{- $img := .Page.Resources.GetMatch .Destination -}} {{- if and (not $img) .Page.File -}} - {{ $path := path.Join .Page.File.Dir .Destination }} - {{- $img = resources.Get $path -}} + {{ with .Page.File }} + {{ $path := path.Join .Dir .Destination }} + {{- $img = resources.Get $path -}} + {{ end }} {{- end -}} {{- if and (not $img) .Page.File -}} diff --git a/themes/red/layouts/_default/list.html b/themes/red/layouts/_default/list.html index f5f5d9f..57c8979 100644 --- a/themes/red/layouts/_default/list.html +++ b/themes/red/layouts/_default/list.html @@ -5,7 +5,7 @@
Name | Description | Year Created | @@ -24,7 +24,7 @@
- {{ if in .File.Dir "software" }}
+ {{ if and (.File) (in .File.Dir "software") }}
{{ else }}
diff --git a/themes/red/layouts/partials/footer.html b/themes/red/layouts/partials/footer.html
index adf09da..96fd1ef 100644
--- a/themes/red/layouts/partials/footer.html
+++ b/themes/red/layouts/partials/footer.html
@@ -23,7 +23,9 @@
Imprint
- Source
+ {{ with .File }}
+ Source
+ {{ end }}
|
---|