{# Reusable meta tags include for SEO and social media. Parameters: - item: The content object (post or page) - content_type: "article" or "website" - include_keywords: Boolean to include keywords meta tag (default: false) - include_article_tags: Boolean to include article-specific OG tags (default: false) #} {# Set default values for optional parameters #} {% set include_keywords = include_keywords | default(false) %} {% set include_article_tags = include_article_tags | default(false) %} {# Standard SEO meta tags #} {% set item_author = item.metadata.get('author') if item.metadata else none %} {% set effective_author = item_author if item_author else default_author %} {% if effective_author %} {% endif %} {% set description = item.description if item.description else site_description %} {% if description %} {% endif %} {% if include_keywords and item.tags %} {% elif include_keywords and site_keywords %} {% endif %} {# Open Graph meta tags #} {% if description %} {% endif %} {% if item.metadata and item.metadata.get('cover') %} {% set cover_url = item.metadata.get('cover') %} {% if cover_url.startswith('http://') or cover_url.startswith('https://') %} {% elif cover_url.startswith('/') %} {% else %} {% endif %} {% elif has_platform_icons %} {% endif %} {# Article-specific Open Graph tags #} {% if include_article_tags %} {% if item.date %} {% endif %} {% if item.modified_date %} {% elif item.date %} {% endif %} {% if item.metadata and item.metadata.get('author') %} {% endif %} {% if item.category %} {% endif %} {% if item.tags %} {% for tag in item.tags %} {% endfor %} {% endif %} {% endif %} {# Twitter Card meta tags #} {% if description %} {% endif %} {% if item.metadata and item.metadata.get('cover') %} {% set cover_url = item.metadata.get('cover') %} {% if cover_url.startswith('http://') or cover_url.startswith('https://') %} {% elif cover_url.startswith('/') %} {% else %} {% endif %} {% elif has_platform_icons %} {% endif %} {% if item.metadata and item.metadata.get('twitter_creator') %} {% endif %} {% if item.metadata and item.metadata.get('twitter_site') %} {% endif %} {# JSON-LD Structured Data #} {# BreadcrumbList JSON-LD #}