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:
PhilandClaude Opus 5.5 committed 2026-11-12 12:27:31 -07:00
1 parent 66aecc2bcb
commit b7f8e1612c
26 files changed
+308 -60

No files matched your search

+1 -1
View File
@@ -67,7 +67,7 @@
</td>
<td class="note-actions">
{% if note.published %}
<a href="{{ url_for('public.note', slug=note.slug) }}" class="button button-small" target="_blank">
<a href="{{ note.url }}" class="button button-small" target="_blank">
View
</a>
{% endif %}
+2 -2
View File
@@ -54,7 +54,7 @@
<footer class="note-meta">
{# u-url and u-uid same for notes (per Q23) #}
<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 · %-I:%M %p') }}</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 · %-I:%M %p') }}</time></a>
{% if note.updated_at and note.updated_at != note.created_at %}
<span class="updated">Updated <time class="dt-updated" datetime="{{ note.updated_at|iso_utc }}">{{ note.updated_at.strftime('%b %-d, %Y') }}</time></span>
{% endif %}
@@ -79,7 +79,7 @@
</footer>
<div id="responses"></div>
{{ responses.reactions(likes, reposts, replies, bookmarks, syndications, absolute_url_for('public.note', slug=note.slug), quotes) }}
{{ responses.reactions(likes, reposts, replies, bookmarks, syndications, note.url, quotes) }}
<nav class="note-nav">
<a href="/">← All notes</a>
+4 -4
View File
@@ -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>