{{ $scratch := newScratch }} {{ $type := .Get "type" }} {{ $pathData := findRE "[^/]+.*?" .Page.RelPermalink }} {{ $currentTelegrafVersion := replaceRE `v` "" (index $pathData 1) }} {{ $scratch.Set "externalPluginLink" "" }} {{ if and (gt (float $currentTelegrafVersion) 1.18) (le (float $currentTelegrafVersion) 1.21) }} {{ $scratch.Set "externalPluginLink" (print "/telegraf/" (index $pathData 1) "/external_plugins/" )}} {{ else if (ge (float $currentTelegrafVersion) 1.22) }} {{ $scratch.Set "externalPluginLink" (print "/telegraf/" (index $pathData 1) "/configure_plugins/external_plugins/" )}} {{ end }} {{ $externalPluginLink := $scratch.Get "externalPluginLink" }} {{ range (index .Site.Data.telegraf_plugins $type ) }} {{ $pluginTags := delimit .tags " " }} {{ $minorVer := replaceRE `\.[^.]*$` "" .introduced }} {{ $supported := cond (le (index (split $minorVer ".") 0) (index (split $currentTelegrafVersion ".") 0)) (le (index (split $minorVer ".") 1) (index (split $currentTelegrafVersion ".") 1)) false }} {{ if $supported }}
{{ $description | markdownify | safeHTML }}