Pull request (OPEN) · PR #1016 feat: filter the list of posts by post type and text · @rmdes
Refs #843.
The list of posts can’t be narrowed down at all. Micropub q=source already supports filter and category (#991), but the posts interface doesn’t use them, and there’s no way to filter by post type.
q=source accepts a post-type parameter, from the Query for Post List Micropub extension. Like filter and category, its value is cast to a string before it reaches the database. It combines with the other filters and with after/before paging.post-type and filter, so the list stays a Micropub client and doesn’t care how posts are stored.URLSearchParams, so search text such as lunch & dinner survives paging.fieldset, select, input and button components, so it looks like the rest of the interface. That stacks the fields vertically. A compact single-row layout would need new styles, which I’ve left out for now.Only en.json has the new strings.
Status, sort order and per-type counts, which my fork has, would each need a new Micropub query feature, so I’ve left them for later.
filter, with real posts seeded into the test database.endpoint-micropub and endpoint-posts tests pass (221/221, Node 24.17); lint and typecheck are clean.