Skip to content

Static file templates have no Date function available #1527

@Jc-L

Description

@Jc-L

Version:

  • listmonk: 2.5.1
  • OS: Debian 11

Description of the bug and steps to reproduce:
Some function, like {{ Date "2006" }}, throw an error when used in static file public/templates/index.html. Use case was to have dynamic (c) date in the footer.

Logs:
2023/09/15 07:39:53 init.go:758: error parsing public templates: template: message.html:43: function "Date" not defined

Expected behaviour:
Make it possible to use function described in templating documentation, possibly also the Sprig function. If not, clarify limitation in documentation.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions