mirror of
https://github.com/gohugoio/hugo.git
synced 2025-02-04 15:52:15 +00:00
tpl: Add hasPrefix to the template funcs' "smoke test"
This commit is contained in:
parent
4502c4e3ae
commit
80d02a14ab
1 changed files with 2 additions and 0 deletions
|
@ -89,6 +89,7 @@ slicestr: {{slicestr "BatMan" 0 3}}
|
||||||
substr: {{substr "BatMan" 0 -3}}
|
substr: {{substr "BatMan" 0 -3}}
|
||||||
substr: {{substr "BatMan" 3 3}}
|
substr: {{substr "BatMan" 3 3}}
|
||||||
title: {{title "Bat man"}}
|
title: {{title "Bat man"}}
|
||||||
|
hasPrefix: {{ hasPrefix "Hugo" "Hu" }}
|
||||||
trim: {{ trim "++Batman--" "+-" }}
|
trim: {{ trim "++Batman--" "+-" }}
|
||||||
upper: {{upper "BatMan"}}
|
upper: {{upper "BatMan"}}
|
||||||
absURL: {{ "mystyle.css" | absURL }}
|
absURL: {{ "mystyle.css" | absURL }}
|
||||||
|
@ -135,6 +136,7 @@ slicestr: Bat
|
||||||
substr: Bat
|
substr: Bat
|
||||||
substr: Man
|
substr: Man
|
||||||
title: Bat Man
|
title: Bat Man
|
||||||
|
hasPrefix: true
|
||||||
trim: Batman
|
trim: Batman
|
||||||
upper: BATMAN
|
upper: BATMAN
|
||||||
absURL: http://mysite.com/hugo/mystyle.css
|
absURL: http://mysite.com/hugo/mystyle.css
|
||||||
|
|
Loading…
Reference in a new issue