diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 968d7ba..f3a16ae 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -9,23 +9,7 @@ {{ $style := resources.Get "/sass/custom.css" | resources.ToCSS $options | resources.Fingerprint }} - - - - - {{ $logoFile := printf "images/ogp/cosin_icon_%s.png" (string .Site.Data.cosin.date_year) }} - {{ $logo := "" }} - {{ with resources.Get $logoFile }} - {{ $logo = . }} - {{ else }} - {{ $logo = resources.Get "images/ogp/cosin_icon_generic.png" }} - {{ end }} - - - - - - + {{ partial "opengraph.html" .}} diff --git a/layouts/partials/opengraph.html b/layouts/partials/opengraph.html new file mode 100644 index 0000000..712d0a1 --- /dev/null +++ b/layouts/partials/opengraph.html @@ -0,0 +1,14 @@ +{{ $fileName := printf "images/ogp/cosin_icon_%s.png" (string .Site.Data.cosin.date_year) }} +{{ $logo := or (resources.Get $fileName) (resources.Get "images/ogp/cosin_icon_generic.png") }} + + + + + +{{ with $logo }} + + + + + +{{ end }}