2

I know that i can get the post date with post.date.

But, how i can get the date of the last post or the date related with the last time the website was generated?

I want to echo something like this: Last update: {{ getDate }}

Christopher
  • 3,379
  • 7
  • 25
  • 36

1 Answers1

2

You want site.time, which will show the exact date/time when the site was last generated:

2015-07-22 17:11:02 +0200

To output the exact date format you want, you can use Liquid's date formatting.

For example, {{ site.time | date: "%-d %B %Y"}} will generate 22 July 2015.

Community
  • 1
  • 1
Christian Specht
  • 35,843
  • 15
  • 128
  • 182