hugo: dont print warning for introduced sc threshold

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2024-08-12 16:57:31 +02:00
parent 1c3f34240b
commit 8ae71a65d2
1 changed files with 10 additions and 12 deletions

View File

@ -41,18 +41,16 @@ Depends on site.Params.min_version_thresholds and i18n strings for component IDs
{{ end }}
{{ end }}
{{- if $versionAboveThreshold }}
<div class="text-gray-light dark:text-gray-dark flex items-center gap-2">
<span class="icon-svg flex items-center">{{ partial "icon.html" "chevron_right" }}</span>
<span>Introduced in {{ T $component }} version
{{- if $link }}
{{ page.RenderString (fmt.Printf `[%s](%s)` $v $link) }}
{{- else }}
{{ $v }}
{{- end }}
</span>
</div>
{{- else }}
{{ warnf "[introduced] version below threshold: %s %s %v" $component $v $pos }}
<div class="text-gray-light dark:text-gray-dark flex items-center gap-2">
<span class="icon-svg flex items-center">{{ partial "icon.html" "chevron_right" }}</span>
<span>Introduced in {{ T $component }} version
{{- if $link }}
{{ page.RenderString (fmt.Printf `[%s](%s)` $v $link) }}
{{- else }}
{{ $v }}
{{- end }}
</span>
</div>
{{- end }}
{{- else }}
{{ errorf "[introduced] invalid component: %s %v" $component $pos }}