Commit 73356ea5 authored by Kaushal Modi's avatar Kaushal Modi

Don't show twitter syndication icon if the synd val is "" or "0"

parent b35278c4
......@@ -16,9 +16,8 @@
{{ $val_is_string := (eq "string" (printf "%T" $val)) }}
{{ range $.Param "social" }}
{{ if (eq $key (.name | lower)) }}
{{ $.Scratch.Set "__syndication_class" "" }}
{{ if (eq $key "twitter") }}
{{ if $val_is_string }}
{{ if (and $val_is_string (not (eq $val "")) (not (eq $val "0"))) }}
{{ $.Scratch.Set "__syndication_link" (printf "%sstatus/%s" .link $val) }}
{{ $.Scratch.Set "__syndication_class" (.name | lower) }}
{{ else if (gt $val 0) }}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment