diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index b653d0d..5eb913d 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -15,9 +15,7 @@
{{ partial "style.html" "css/highlight.css" }}
{{ partial "style.html" "css/shareon.css" }}
- {{ if eq .Params.layout "flickr" }}
- {{ partial "style.html" "css/lightgallery.css" }}
- {{ end }}
+ {{ block "style_extra" . }}{{ end }}
{{ partial "title-item.html" . }}{{ .Site.Title }}
diff --git a/layouts/_default/flickr.html b/layouts/_default/flickr.html
index 17e29e5..fd8b307 100644
--- a/layouts/_default/flickr.html
+++ b/layouts/_default/flickr.html
@@ -28,6 +28,10 @@
{{ end }}
+{{ define "style_extra" }}
+ {{ partial "style.html" "css/lightgallery.css" }}
+{{ end }}
+
{{ define "scripts_extra" }}
{{ partial "script_async.html" "js/lightgallery.min.js" }}
{{ end }}