News as blog posts: richer post page, blog list with pages, archives, drafts and motorino new #11
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/blog-news"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I am making the news of kmalloc.org read like a blog (#9). Everything is opt in or backward compatible: a site that does not use the new placeholders and blocks builds as before.
What changes
date_long,post_summary,post_meta,post_reading,post_mastodon,post_nav(older, newer, all news),og_typeandarticle_meta(Open Graph article).{{news_blog}}: the blog list (title, long date, categories, description, read more), 10 to a page, with the other pages atpage/2/,page/3/and a pager./news/2026/,/news/2026/11/) whentemplates/archive.htmlexists, and a{{news_archive}}block.description, the full text incontent:encoded, plus categories anddc:creator.Mastodon,DraftandLanguage;Draft: trueand a future date keep a post out of the site;motorino build -draftsshows them.motorino new "title"writesnews/<slug>.mdas a draft with the header ready.news_languageinsite.json, elseen; a post can setLanguage), with the interface strings of that language. They still exist once, not once per language.How I checked it
new,-drafts);make checkis green.squid/kmalloc.org, branchfeat/blog-news, not merged) and ran the Nu HTML Checker like the CI does: 27 pages, 0 errors, CSS valid.Not released and not merged: the site needs this version in
.motorino-version.Refs #9
Lists as note panels
In the blog list, on the pages of a category and on the pages of an archive I show every post as a note panel, like the shop block of the services page: a small line with the long date and the categories, the title in bold with a full stop (unless it ends with
.,?or!), the description and a read more link whosearia-labelnames the post. The page of a post,{{news_list}}and the latest news of the home page do not change. Where a language has noread_morethe title is the link on the category and archive pages; the blog list still needs the string.Review fixes
{{news_archive}}is empty when there are no posts, and the heading of an empty{{news_archive}}or{{categories_list}}goes with it, so a site without news says so once.-cleanempties the folder first, only when it is new, empty or holds the.motorino-outfile that an earlier-cleanleft, and never the folder of the site or one that holds it. Without-cleannothing changes and no extra file is written, so the deploy (a new folder published withrsync --delete) is not affected.make checkis green: 269 tests (167 at the top level), none failing. The Nu HTML Checker finds no error on the real site.- {{news_blog}} lists the posts as entries (title, long date, categories, description, a read more link) 10 to a page; the other pages are written under the index, at page/2/, page/3/ and so on, with a pager. - Archive pages for every year and month that has posts, at /news/2026/ and /news/2026/11/, when templates/archive.html exists, and a {{news_archive}} block. Refs #9The blog list, the pages of a category and the pages of an archive show every post as a note panel: a small line with the long date and the categories, the title in bold with a full stop (unless it ends with a full stop, a question mark or an exclamation mark), the description and a read more link whose aria-label names the post. The page of a post, {{news_list}} and the latest news of the home page are unchanged. A language without read_more gets the title as the link on the category and archive pages, as those pages worked before; the blog list still needs the string. Refs #9- groupArchive compared each post with the last group only, so two posts near midnight at the end of a month, written with different offsets, listed the same month twice and the build failed with "both published as". Posts are grouped by their own year and month, newest first. - {{news_archive}} is empty when there are no posts, so the index says there is no news once, and the heading of an empty {{news_archive}} or {{categories_list}} goes with it. - tests for exactly ten posts, eleven posts, a single post, a title with quotes, an ampersand, a tag and non Latin letters, and a neighbour written in another language Refs #9motorino new#9