danix
's git repository
home
/
my projects
/
theme-danix.xyz.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2b5a194
)
working on the header image. Still does't show images set in front matter.
author
danix
<danix@danix.xyz>
Sat, 11 Mar 2023 09:55:15 +0000
(10:55 +0100)
committer
danix
<danix@danix.xyz>
Sat, 11 Mar 2023 09:55:15 +0000
(10:55 +0100)
layouts/partials/head-addition.html
patch
|
blob
|
blame
|
history
diff --git
a/layouts/partials/head-addition.html
b/layouts/partials/head-addition.html
index
475d3b4
..
40ac3a0
100644
(file)
--- a/
layouts/partials/head-addition.html
+++ b/
layouts/partials/head-addition.html
@@
-2,11
+2,13
@@
* Add the featured image to the header if it's present in the Front Matter
*/}}
{{ if .IsPage }}
* Add the featured image to the header if it's present in the Front Matter
*/}}
{{ if .IsPage }}
- {{ if isset .Params "featured_image" }}
- <style media="screen">
- #banner {
- background-image: url( {{ $.Params.featured_image | absURL }} );
- }
- </style>
+ {{ with $.Params.featured_image }}
+ {{ $source := $.Params.featured_image }}
+ {{ $image := resources.Get $source }}
+ <style media="screen">
+ #banner {
+ background-image: url( {{ $image.Permalink }} );
+ }
+ </style>
{{ end }}
{{ end }}
{{ end }}
{{ end }}