Commit graph

34 commits

Author SHA1 Message Date
tgiachi
71cf14006d feat(news): show the posts of the lists as note panels
All checks were successful
check / check (pull_request) Successful in 30s
The 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
2026-11-16 12:32:09 +01:00
tgiachi
633da1c46b feat: motorino new writes a draft, motorino build -drafts previews it
All checks were successful
check / check (pull_request) Successful in 30s
motorino new -site DIR "A title" writes news/a-title.md with the header ready:
the date of now, the author from site.json, the category News and Draft: true.
motorino build -drafts publishes the drafts and the posts dated in the future,
for a preview. The README describes the header keys, the news language, the blog
placeholders and blocks, and the language strings they use.

Refs #9
2026-11-16 12:10:30 +01:00
tgiachi
3f62c79603 feat(feed): carry the full text in content:encoded
The description of an item is now the plain summary of the post, the full text with
absolute links goes in content:encoded (the end marker of a CDATA section inside
the text is split), and an item has its categories and its author (dc:creator).

Refs #9
2026-11-16 12:09:03 +01:00
tgiachi
4a501d77b3 feat(news): blog list with pages, and an archive by year and month
- {{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 #9
2026-11-16 12:08:07 +01:00
tgiachi
bf50b2e1c2 feat(news): a post page with date, author, categories, summary and links
New placeholders for templates/post.html, written in the language of the post:
date_long, post_summary, post_meta, post_reading, post_mastodon and post_nav
(older, newer and all news), plus og_type and article_meta for Open Graph, which
every other page sets to website. A post with a Mastodon address needs the
reply_mastodon string; the other strings are optional and a feature without its
string is left out.

Refs #9
2026-11-16 12:06:55 +01:00
tgiachi
26edf78449 feat(news): hide drafts and future posts, give the news one language
- Draft: true and a date in the future keep a post out of the pages, the lists,
  the categories and the feed. motorino build -drafts (next commit) shows them.
- news_language in site.json, and an optional Language key in a post, choose the
  language of the news pages and of the interface strings they use. The news
  still exist once, not once per language.
- New header keys Mastodon (an https address), Draft and Language; a post knows
  its reading time and whether its description was written.

Refs #9
2026-11-16 12:04:50 +01:00
tgiachi
b2f43c34bb chore(release): 1.2.0 [skip ci] v1.2.0 2026-11-15 18:08:42 +01:00
tgiachi
eb2a8dc9b4 feat: take the menu from the site, not from the code
The menu entries were three lists in Go (the menu, the linked pages and
the required pages), so a new menu entry meant a new motorino release.
Now every page ID gets url_<id> and cur_<id> for the templates, and
header.html alone decides what is in the menu and in which order. Only
the home page and the news section stay required, since motorino builds
them itself.

Output of the real kmalloc.org site is byte for byte the same as 1.1.0.
2026-11-15 18:08:42 +01:00
tgiachi
d7f076659a chore(release): 1.1.0 [skip ci] v1.1.0
## [1.1.0](https://git.kmalloc.org/squid/motorino/compare/v1.0.1...v1.1.0) (2026-11-15)

### Features

* add an optional projects page to the menu (1505e5d)
2026-11-15 17:44:50 +01:00
tgiachi
1505e5d782 feat(nav): add an optional projects page to the menu
kmalloc.org wants a "Projects" entry between People and Services,
linking to a page listing the software it currently builds. Adds
"projects" to the menu, the linked pages and the required pages, and
keeps the test fixtures (and the main_test page count) in sync.
2026-11-15 17:44:40 +01:00
semantic-release-bot
f92d5e8cb4 chore(release): 1.0.1 [skip ci] v1.0.1
## [1.0.1](https://git.kmalloc.org/squid/motorino/compare/v1.0.0...v1.0.1) (2026-11-15)

### Bug Fixes

* close the minor findings of the first review ([917683a](917683afa4))
* find code blocks with the Markdown parser and make the escape work everywhere ([4ab8f8d](4ab8f8d122))
2026-11-15 10:40:28 +01:00
3411f2c522 Merge pull request 'Close the minor findings of the first review' (#7) from fix/review-minors into main
All checks were successful
check / check (push) Successful in 29s
2026-11-15 09:40:06 +00:00
tgiachi
4ab8f8d122 fix: find code blocks with the Markdown parser and make the escape work everywhere
All checks were successful
check / check (pull_request) Successful in 30s
The hand written fence scanner took a line that starts with a code span for a
fence and missed fences in quotes and lists. The code blocks are now the ones
goldmark finds. A backslash before a placeholder is turned into a marker that
survives the Markdown and the list expansion, so it works in a code span and
next to a block name, and two backslashes are a literal one. The em dash rule
reports the line of the body, refuses padded entities and checks the header keys
by name, the feed leaves protocol-relative links alone, base_url needs a host
and a language file cannot set it.
2026-11-15 10:38:56 +01:00
tgiachi
917683afa4 fix: close the minor findings of the first review
Require refuses an empty value. Heading ids: an explicit {#id} must be sound
and unique, generated ids avoid the explicit ones and each other, and a heading
with no ASCII letters gets a fallback. Fenced code blocks keep their
placeholders and a backslash keeps one anywhere. The em dash rule covers the
header of the manifesto pages and the HTML entities. The feed makes src links
absolute, base_url is required, and the news page must be a folder index. A
category written twice in a post counts once, a block name in a news title is no
longer taken for a placeholder, and build refuses extra arguments.
2026-11-15 10:32:19 +01:00
tgiachi
8f294d92e2 docs: mention the check workflow in the README
All checks were successful
check / check (push) Successful in 29s
2026-11-15 10:27:25 +01:00
94c23442be Merge pull request 'Run make check on every push and pull request' (#5) from ci/check into main
All checks were successful
check / check (push) Successful in 1m15s
2026-11-15 09:21:44 +00:00
tgiachi
beb7698a77 ci: run make check on every push and pull request
All checks were successful
check / check (pull_request) Successful in 1m28s
2026-11-15 10:18:21 +01:00
semantic-release-bot
aafc15baf4 chore(release): 1.0.0 [skip ci] v1.0.0
## 1.0.0 (2026-11-15)

### Features

* add the build and version commands ([2c39754](2c3975430b))
* assemble the site from content, templates and assets ([6bdf2ca](6bdf2ca05f))
* build the news lists, category lists and the feed ([2f5cb15](2f5cb15f21))
* let a heading set its own id with {[#id](https://git.kmalloc.org/squid/motorino/issues/id)} ([a850e9e](a850e9ed41))
* let a page say which manifesto version it translates ([0148306](0148306a64))
* load pages and news with dated paths and categories ([51071e6](51071e6fb2))
* load site.json and the language files ([97af0c4](97af0c422d))
* parse the Key: value header with a "-" terminator ([a3b0a80](a3b0a8028e))
* render Markdown with stable heading ids and the em dash rule ([2c7bca3](2c7bca35be))
* substitute placeholders and escape text ([27dac18](27dac18c8f))

### Bug Fixes

* escape the title attribute, refuse clashing addresses and unsafe paths, check Switch ([1298a98](1298a98f30))
* give no id to the level 1 heading ([935bf39](935bf3958f))
2026-11-15 10:05:43 +01:00
tgiachi
d2f19e7644 chore: add the release publishing script 2026-11-15 10:05:13 +01:00
324f015737 Merge pull request 'Add the motorino generator' (#3) from feat/generator into main 2026-11-15 09:04:38 +00:00
tgiachi
1298a98f30 fix: escape the title attribute, refuse clashing addresses and unsafe paths, check Switch
A quote in a title broke the og:title attribute (a regression from build.py).
Two sources that give the same output address now stop the build and name
both, instead of one replacing the other. Asset names and sources must be
paths inside the site, language codes must look like codes, and the Switch key
is escaped, must point to a path and may name only listed languages.
2026-11-15 10:03:58 +01:00
tgiachi
0148306a64 feat: let a page say which manifesto version it translates 2026-11-15 09:57:09 +01:00
tgiachi
a850e9ed41 feat: let a heading set its own id with {#id} 2026-11-15 09:53:36 +01:00
tgiachi
2c3975430b feat: add the build and version commands 2026-11-15 09:51:52 +01:00
tgiachi
6bdf2ca05f feat: assemble the site from content, templates and assets 2026-11-15 09:50:58 +01:00
tgiachi
935bf3958f fix: give no id to the level 1 heading 2026-11-15 09:48:08 +01:00
tgiachi
2f5cb15f21 feat: build the news lists, category lists and the feed 2026-11-15 09:46:58 +01:00
tgiachi
51071e6fb2 feat: load pages and news with dated paths and categories 2026-11-15 09:45:50 +01:00
tgiachi
97af0c422d feat: load site.json and the language files 2026-11-15 09:44:01 +01:00
tgiachi
2c7bca35be feat: render Markdown with stable heading ids and the em dash rule 2026-11-15 09:43:26 +01:00
tgiachi
27dac18c8f feat: substitute placeholders and escape text 2026-11-15 09:42:13 +01:00
tgiachi
a3b0a8028e feat: parse the Key: value header with a "-" terminator 2026-11-15 09:41:54 +01:00
tgiachi
704214c6c4 chore: scaffold the module, tooling and release config 2026-11-15 09:41:05 +01:00
tgiachi
5ed9aff797 chore: add the GPL 3 licence and the ignore list 2026-11-15 09:35:33 +01:00