Template actions

Bonjour,
In an example of a markdown site, I found a template containing the following code:
{{range .Files}}
{{if ne .Name “index.md” }}
{{if not .IsDir }}
{{.Summarize 15}}

Where do the commands .IsDir, .Summarize, etc come from ?
(I don’t find them in the Template Caddy help nor in the Go one).
Are there other similar instructions ?

Merci d’avance.
DanBE

Can you provide a link to this example at all?

Additional Go functions can be provided to a template as a function map in the source code. Caddy provides a number of functions as outlined in the Template Actions docs that provide contextual information, as well as some utility - but I don’t see .Summarize or .IsDir there.

https://caddyserver.com/docs/template-actions

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.