mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
tpl: Add humanize examples to smoke tests
This commit is contained in:
parent
55a4f6e48e
commit
3564f09e3d
1 changed files with 8 additions and 0 deletions
|
@ -93,6 +93,10 @@ eq: {{ if eq .Section "blog" }}current{{ end }}
|
|||
findRE: {{ findRE "[G|g]o" "Hugo is a static side generator written in Go." 1 }}
|
||||
hasPrefix 1: {{ hasPrefix "Hugo" "Hu" }}
|
||||
hasPrefix 2: {{ hasPrefix "Hugo" "Fu" }}
|
||||
humanize 1: {{ humanize "my-first-post" }}
|
||||
humanize 2: {{ humanize "myCamelPost" }}
|
||||
humanize 3: {{ humanize "52" }}
|
||||
humanize 4: {{ humanize 103 }}
|
||||
in: {{ if in "this string contains a substring" "substring" }}Substring found!{{ end }}
|
||||
jsonify: {{ (slice "A" "B" "C") | jsonify }}
|
||||
lower: {{lower "BatMan"}}
|
||||
|
@ -145,6 +149,10 @@ eq: current
|
|||
findRE: [go]
|
||||
hasPrefix 1: true
|
||||
hasPrefix 2: false
|
||||
humanize 1: My first post
|
||||
humanize 2: My camel post
|
||||
humanize 3: 52nd
|
||||
humanize 4: 103rd
|
||||
in: Substring found!
|
||||
jsonify: ["A","B","C"]
|
||||
lower: batman
|
||||
|
|
Loading…
Reference in a new issue