{% macro social_metadata(record, schema_type='WebPage', og_type='website', project=none) -%} {% set site_url = 'https://www.labyricorn.com' %} {% set canonical_url = site_url ~ record.url_path %} {% set fallback_image_path = '/static/labyricorn-social-card.png' %} {% set image_alt = 'Labyricorn — systems, ideas, infrastructure, built to evolve.' %} {% if schema_type == 'Article' %} {% set fallback_image_path = '/static/labyricorn-social-article.png' %} {% set image_alt = 'Labyricorn Article // Analysis social card.' %} {% elif schema_type == 'BlogPosting' %} {% set fallback_image_path = '/static/labyricorn-social-blog.png' %} {% set image_alt = 'Labyricorn Blog // Signal social card.' %} {% elif schema_type == 'SoftwareSourceCode' %} {% set fallback_image_path = '/static/labyricorn-social-project.png' %} {% set image_alt = 'Labyricorn Project // System social card.' %} {% elif schema_type == 'TechArticle' %} {% set fallback_image_path = '/static/labyricorn-social-devlog.png' %} {% set image_alt = 'Labyricorn Devlog // Build Log social card.' %} {% endif %} {% set image_url = site_url ~ fallback_image_path %} {% set image_is_fallback = true %} {% set image_reference = '' %} {% if record.logo %} {% set image_reference = record.logo|string %} {% set image_alt = record.title ~ ' logo' %} {% else %} {% set rendered_body = record.body|string %} {% if ' {% if image_is_fallback %} {% endif %} {% if record.author %}{% endif %} {% if og_type == 'article' and record.date %}{% endif %} {% if og_type == 'article' and record.updated %}{% endif %} {%- endmacro %} {% macro share_controls(record, content_kind='page', project=none) -%} {% set canonical_url = 'https://www.labyricorn.com' ~ record.url_path %} {% set share_title = record.title|striptags|trim %} {% if project %}{% set share_title = project.title ~ ' devlog: ' ~ record.title %}{% endif %} {% set share_description = record.summary|default('', true)|striptags|trim|truncate(180, true, '…') %} {% set bluesky_text = (share_title|truncate(210, true, '…')) ~ ' ' ~ canonical_url %} {%- endmacro %}