diff --git a/templates/meta-tags-dynamic.html b/templates/meta-tags-dynamic.html index 672e6dc..95aa2f3 100644 --- a/templates/meta-tags-dynamic.html +++ b/templates/meta-tags-dynamic.html @@ -1,4 +1,13 @@ {{ define "meta-tags-dynamic" }} + +{{ $SeoImageUrl := "" }} +{{ if .Files }} + {{ $FirstFile := index .Files 0 }}ы + {{ $SeoImageUrl = printf "https://micrach.igonin.dev/uploads/%d/t/%d.%s" .ID $FirstFile.ID $FirstFile.Ext }} +{{ else }} + {{ $SeoImageUrl = "https://memepedia.ru/wp-content/uploads/2018/03/ebanyy-rot-etogo-kazino.png" }} +{{ end }} + {{ .Title }} @@ -11,12 +20,12 @@ - + - + - + {{ end }} \ No newline at end of file