Inserting page last modified time inline

Hi! I need to display when the page last modified inline.

When using my own shortcode:

{{< time.inline >}}{{ dateFormat "Monday, Jan 2, 2006" .Params.LastMod }}{{< /time.inline >}}

I receive the following error message:": failed to render shortcode "time.inline": failed to process shortcode: template: _inline_shortcode/privacy/ executing "_inline_shortcode/privacy/" at <.Params.LastMod>: can't evaluate field LastMod in type interface {}

What am I missing please?

Use .Page.Lastmod instead of .Params.LastMod

you can define in your config file, where .LastMod comes from


date                       = [ "date", ":filename", ":default"]
publishDate                = [ "publishDate", "date"]
lastmod                    = [ "lastmod", ":fileModTime", "publishDate"]
expiryDate                 = [ "expiryDate"]

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