Add rich social sharing support
Deploy production / deploy (push) Successful in 22s

This commit is contained in:
2026-08-22 20:29:40 -07:00
parent feff0577ad
commit 1d9dd212bf
8 changed files with 277 additions and 4 deletions
+7
View File
@@ -1,6 +1,10 @@
{% extends "base.html" %}
{% from "macros/tag-links.html" import tag_links with context %}
{% from "macros/narration-player.html" import narration_player with context %}
{% from "macros/social-sharing.html" import social_metadata, share_controls with context %}
{% block social_head %}
{% if this.parent._id == 'blog' %}{{ social_metadata(this, 'BlogPosting', 'article') }}{% else %}{{ social_metadata(this, 'Article', 'article') }}{% endif %}
{% endblock %}
{% block body %}
{% if this.parent._id == 'blog' %}
<article class="blog-post-layout shell">
@@ -37,6 +41,7 @@
{{ this.body }}
{% if this.external_url %}<p><a class="button-link" href="{{ this.external_url }}">Visit project →</a></p>{% endif %}
</div>
{{ share_controls(this, 'post') }}
</article>
{% elif this.parent._id == 'articles' %}
{% set article_word_count = this.body|striptags|wordcount %}
@@ -105,6 +110,7 @@
{{ this.body }}
{% if this.external_url %}<p><a class="button-link" href="{{ this.external_url }}">Visit project →</a></p>{% endif %}
</div>
{{ share_controls(this, 'article') }}
</article>
{% else %}
<article>
@@ -119,6 +125,7 @@
<div class="shell prose">
{{ this.body }}
{% if this.external_url %}<p><a class="button-link" href="{{ this.external_url }}">Visit project →</a></p>{% endif %}
{{ share_controls(this, 'page') }}
</div>
</section>
</article>