SEO titles/descriptions for tags and archive pages
The better approach in my opinion is to declare the variables in the corresponding templates rather than in the _layout template

Layout.twig

{% if seoTitle is not defined or seoTitle is empty %}
    {% set seoTitle = config.seoTitle %} &lt;-- fallback if nothing is defined
{% endif %}
&lt;title&gt;{{ siteName }} - {{ seoTitle }}&lt;/title&gt;


_entry.twig

{% extends 'layout' %}
{% set seoTitle = entry.seoTitle %}


_category.twig

{% extends 'layout' %}
{% set seoTitle = category.seoTitle %}


_someOtherTemplates.twig

{% extends 'layout' %}
{% set seoTitle = 'Some hard coded strings....' %}


and so on. That way you can define seoTags based on custom properties as well otherwise it would be difficult to determinate tags on dynamic template routes without an entry or a category