feat: articles at /article/<slug> with slugs from their titles (v2.17.0, ADR-077)
Articles (notes with a title) move from /note/<slug> to /article/<slug>; the other prefix 301-redirects. New articles take their slug from the title (mp-slug still wins; notes keep timestamp slugs). A Micropub update that adds or removes a title answers 201 with the new Location. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
66aecc2bcb
commit
b7f8e1612c
26 files changed
+308
-60
No files matched your search
@@ -6,7 +6,7 @@
|
||||
<article class="h-entry note-preview">
|
||||
{# Titled notes are articles (ADR-076) #}
|
||||
{% if note.title %}
|
||||
<h2 class="p-name"><a href="{{ absolute_url_for('public.note', slug=note.slug) }}">{{ note.title }}</a></h2>
|
||||
<h2 class="p-name"><a href="{{ note.url }}">{{ note.title }}</a></h2>
|
||||
{% endif %}
|
||||
|
||||
{% if note.in_reply_to %}
|
||||
@@ -25,7 +25,7 @@
|
||||
<p>{{ summary }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
<p class="read-more"><a href="{{ absolute_url_for('public.note', slug=note.slug) }}">Read more →</a></p>
|
||||
<p class="read-more"><a href="{{ note.url }}">Read more →</a></p>
|
||||
{% else %}
|
||||
{{ display_media(note.media, note.excerpt|truncate(150)) }}
|
||||
{# Always present, even empty: without it a text-free photo post gets an implied name (mf2) #}
|
||||
@@ -35,13 +35,13 @@
|
||||
{% endif %}
|
||||
|
||||
<footer class="note-meta">
|
||||
<a class="u-url u-uid" href="{{ absolute_url_for('public.note', slug=note.slug) }}"><time class="dt-published" datetime="{{ note.created_at|iso_utc }}">{{ note.created_at.strftime('%b %-d, %Y') }}</time></a>
|
||||
<a class="u-url u-uid" href="{{ note.url }}"><time class="dt-published" datetime="{{ note.created_at|iso_utc }}">{{ note.created_at.strftime('%b %-d, %Y') }}</time></a>
|
||||
{% if note.tags %}
|
||||
<span class="note-tags">
|
||||
{% for tag in note.tags %}<a class="p-category" rel="tag" href="{{ url_for('public.tag', tag=tag.name) }}">{{ tag.display_name }}</a>{% endfor %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{{ list_counts(note.response_counts if note.response_counts is defined else None, absolute_url_for('public.note', slug=note.slug)) }}
|
||||
{{ list_counts(note.response_counts if note.response_counts is defined else None, note.url) }}
|
||||
{% if author %}
|
||||
{# Single-author site: keep the h-card for parsers, hide it from readers #}
|
||||
<span class="p-author h-card visually-hidden"><a class="p-name u-url" href="{{ author.url or author.me }}">{{ author.name or author.url or author.me }}</a></span>
|
||||
|
||||
Reference in new issue
Block a user