wagtail-metadata
wagtail-metadata copied to clipboard
W3C Validator {% block meta %}
The following code is not a valid HTML. You can see screenshot where the W3C validator trigger errors.
{% block meta %}
<meta itemprop="url" content="{{ object.get_meta_url }}">
<meta itemprop="name" content="{{ object.get_meta_title }}">
<meta itemprop="description" content="{{ object.get_meta_description }}">
{% if meta_image %}<meta itemprop="image" content="{{meta_image}}">{% endif %}
<title>{{ object.get_object_title }}</title>
<meta name="description" content="{{ object.get_meta_description }}">
{% endblock meta %}
yeah this might be an outdated way to reference these things, I believe the correct syntax is something like
<meta name="description" content="description goes here">
No that's not right, these are valid tags, they're for schema.org validation. To fix this you should add an itemscope
and a relevant itemType
to your head
element e.g.
<head itemscope itemtype="https://schema.org/WebPage">
{% meta_tags %}
</head>
This could be better explained in the readme
You're right @seb-b 👍 , it's ok but need documentation