mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Add fileStat to tpl/os/os
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
a6b1eb1e91
commit
d71120852a
@@ -55,6 +55,13 @@ func init() {
|
||||
},
|
||||
)
|
||||
|
||||
ns.AddMethodMapping(ctx.FileStat,
|
||||
[]string{"fileStat"},
|
||||
[][2]string{
|
||||
{`{{ (fileExists "files/README.txt").Size }}`, `11`},
|
||||
},
|
||||
)
|
||||
|
||||
return ns
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user