mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-29 18:50:59 +00:00
b53504fe64
Creates an OpenGraph template include in base.html including the basic tags expected on all pages. Then allows any page to add additional expected tags via `context`. Currently, profiles and posts are enriched to show complete opengraph metadata, and render correctly in Discord. Note: This does not show posts in Slack like Twitter/Mastodon do. I believe this is due to Slack preferring oembed when present, which is a mastodon API endpoint we may need to create at some point.
17 lines
613 B
HTML
17 lines
613 B
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Post by {{ post.author.html_name_or_handle }}{% endblock %}
|
|
|
|
{% block opengraph %}
|
|
{% include "_opengraph.html" with opengraph_local=post.to_opengraph_dict %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% for ancestor in ancestors reversed %}
|
|
{% include "activities/_post.html" with post=ancestor reply=True link_original=False %}
|
|
{% endfor %}
|
|
{% include "activities/_post.html" %}
|
|
{% for descendant in descendants %}
|
|
{% include "activities/_post.html" with post=descendant reply=True link_original=False %}
|
|
{% endfor %}
|
|
{% endblock %}
|