fix: Replies and photo posts read as the right post type (v2.6.5)
Checked rendered pages with mf2py against W3C Post Type Discovery: - Note pages put u-in-reply-to inside a bare h-cite, making it the h-cite's property, so replies parsed as notes (or photo posts). The reply context is now the entry's u-in-reply-to h-cite. - Home page previews had no reply markup; they now show "In reply to" with u-in-reply-to. - Previews always emit e-content, so a text-free photo post can't get an implied name. - Text-free page titles follow PTD order (Repost, Like, Reply, Photo). tests/test_post_types.py runs PTD on parsed note pages and the home page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d0bfc80c2e
commit
a551770c76
5 files changed
+129
-5
No files matched your search
@@ -9,6 +9,10 @@
|
||||
<h2 class="p-name"><a href="{{ absolute_url_for('public.note', slug=note.slug) }}">{{ note.title }}</a></h2>
|
||||
{% endif %}
|
||||
|
||||
{% if note.in_reply_to %}
|
||||
<p class="reaction reply-to"><span class="reaction-verb">↩ In reply to</span> <a class="u-in-reply-to" href="{{ note.in_reply_to }}">{{ note.in_reply_to }}</a></p>
|
||||
{% endif %}
|
||||
|
||||
{{ reaction(note) }}
|
||||
|
||||
{{ display_media(note.media) }}
|
||||
@@ -19,7 +23,8 @@
|
||||
<p>{{ note.excerpt }}</p>
|
||||
</div>
|
||||
<p class="read-more"><a href="{{ absolute_url_for('public.note', slug=note.slug) }}">Read more →</a></p>
|
||||
{% elif note.html %}
|
||||
{% else %}
|
||||
{# Always present, even empty: without it a text-free photo post gets an implied name (mf2) #}
|
||||
<div class="e-content">
|
||||
{{ note.html|safe }}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user