File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 11{{- $.Scratch.Add "index" slice - }}
22{{- range site.RegularPages - }}
33 {{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }}
4- {{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary "date" (.Date.Format "2006-01-02") "image" (( print .Site.BaseURL .Params.image) | absURL)) - }}
4+ {{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary "date" (.Date.Format "2006-01-02") "image" {{- if hasPrefix .Params.image "http" } (( print .Params.image )) {{- else - } }((print . Site.BaseURL .Params.image) | absURL)) {{ end -}} -}}
55 {{- end }}
66{{- end - }}
77{{- $.Scratch.Get "index" | jsonify - }}
Original file line number Diff line number Diff line change @@ -23,8 +23,12 @@ <h2 class="tags__title">{{ .Title }}</h2>
2323 < div class ="results ">
2424 {{- $pages := union .RegularPages .Sections }}
2525 {{ range $pages }}
26+ {{ $image := .Params.image }}
27+ {{if hasPrefix $image "http" }}
28+ {{ else }}
29+ {{ $image = print .Site.BaseURL .Params.image }}
2630 < div class ="resultItem ">
27- < div class ="resultItem__media " style ="background-image: url({{ (print .Site.BaseURL .Params. image) | absURL }}); "> </ div >
31+ < div class ="resultItem__media " style ="background-image: url({{ (print $ image ) | absURL }}); "> </ div >
2832 < div class ="resultItem__body ">
2933 < h3 class ="resultItem__title "> < a href ="{{ .Permalink }} "> {{ .Title }}</ a > </ h3 >
3034 < div class ="resultItem__footer "> {{ .Date.Format "2006-01-02" }}</ div >
You can’t perform that action at this time.
0 commit comments