Metadata description not showing

Hi there this is my first post, I found Grav really promissing and powerfull, excelent work!


Following the tutorial for new theme , the metadata doesn´t show:

{% if header.description %}
   <meta name="description" content="{{ header.description }}">
{% else %}
   <meta name="description" content="{{ site.description }}">
{% endif %}

But if I change




it works.

{% if page.header.metadata.description %}  
   <meta name="description" content="{{ page.header.metadata.description }}">
{% else %}   
   <meta name="description" content="{{ site.description }}"> 
{% endif %}

Is tutorial wrong or I’m missing something?


Ah yes, the tutorial is out of date. We changed how metadata is stored quite a while ago. The tutorial clearly needs to be rewritten. Thanks for mentioning it. I’ll add it to my list of things. Thanks.

BTW, best way to learn about themes is to look at existing ones. Antimatter is going to be the best supported one to use as a learning tool.

ok great! I’ll keep that in mind, thanks!