How to add meta-tag with today's date?


#1

Hi all,

I’d like to add a meta-tag to my page-template that always displays the actual date, like this:

<meta name="date" content="Mon, 11 Sep 2017 17:22:44 +0200">

How would I achieve that? Any help is appreciated big time.


#2

Add this code into your template:
<meta name="date" content="{{ now|date('r') }}">


#3

Thank you so much for the enlightenment and I promise to dig deeper into the Twig documentation in the future.