{% comment %} SEO Meta Tags Template for Wagtail Feathers Include this template in your page section to automatically generate: - Basic meta tags (title, description, canonical URL) - Open Graph tags for social media sharing - Twitter Card tags - Search engine directives (robots) Usage: {% include "wagtail_feathers/seo/meta.html" %} Requires: - page: Current page object with SeoMixin applied {% endcomment %} {% load seo_tags %} {# Basic meta tags #} {{ page.get_seo_title }} {# Canonical URL #} {% if page.get_canonical_url %} {% endif %} {# Open Graph meta tags for social media #} {% if page.get_canonical_url %} {% endif %} {# Open Graph image #} {% with seo_image=page.get_seo_image %} {% if seo_image %} {% load wagtailimages_tags %} {% image seo_image fill-1200x630 as og_image %} {% endif %} {% endwith %} {# Site name from Wagtail site settings #} {% if page.get_site %} {% endif %} {# Twitter Card meta tags #} {# Twitter image - reuse Open Graph image #} {% with seo_image=page.get_seo_image %} {% if seo_image %} {% load wagtailimages_tags %} {% if page.twitter_card_type == 'summary_large_image' %} {% image seo_image fill-1200x630 as twitter_image %} {% else %} {% image seo_image fill-400x400 as twitter_image %} {% endif %} {% endif %} {% endwith %} {# Additional meta tags for specific content types #} {% if page.seo_content_type == 'article' %} {# Article-specific meta tags #} {% if page.publication_date %} {% endif %} {% if page.revision_date %} {% elif page.last_published_at %} {% endif %} {# Article tags from taxonomy #} {% if page.tags.all %} {% for tag in page.tags.all %} {% endfor %} {% endif %} {% endif %} {# Language and locale #} {% get_current_language as LANGUAGE_CODE %} {# Custom meta tags from page-specific implementations #} {% if page.get_custom_meta_tags %} {% for name, content in page.get_custom_meta_tags.items %} {% endfor %} {% endif %} {# Custom Open Graph tags from page-specific implementations #} {% if page.get_custom_og_tags %} {% for property, content in page.get_custom_og_tags.items %} {% endfor %} {% endif %} {# Custom Twitter tags from page-specific implementations #} {% if page.get_custom_twitter_tags %} {% for name, content in page.get_custom_twitter_tags.items %} {% endfor %} {% endif %} {# Additional structured data will be included via structured_data.html #}