feat: add hint
support
This commit is contained in:
parent
3a2a6482da
commit
b82719b135
1 changed files with 9 additions and 0 deletions
|
@ -37,6 +37,15 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if ( and $hint ( not $isResizable ) ) -}}
|
||||||
|
{{- warnidf "pointless-hint" "Hint '%s' provided for an image that is not convertible to .webm, ignoring… (%q)" $hint $img.File.Path }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $valid_hint_values := ( slice "drawing" "icon" "photo" "picture" "text" ) -}}
|
||||||
|
{{- if ( and $hint ( not ( in $valid_hint_values $hint ) ) ) -}}
|
||||||
|
{{- errorf "Hint '%s' is not valid, use one of %q instead. (%q)" $hint $img.File.Path -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
<!-- Rendering -->
|
<!-- Rendering -->
|
||||||
|
|
||||||
{{- if $isResizable -}}
|
{{- if $isResizable -}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue