Commit graph motorino/internal/build/gemini_test.go
Author SHA1 Message Date
tgiachi
3764470e9b fix(gemini): list items, spaces in addresses, wide tables, per post language, empty lists, layout images
All checks were successful
check / check (pull_request) Successful in 30s
- a list item with no text (only an image or a link without a label) has no empty bullet,
  its links are still written
- paragraphs and table cells of a list item do not stick together, and a preformatted
  block in an item stays a block after its bullet
- spaces in the address of a link line are written as %20
- a wide table with an empty first cell has no empty heading, a wide table with only a
  header or only one column is written as bullets, and the header is not lost
- a post in another language than the news has its own line in .meta, before the lines
  of the folders: the server uses the first line that matches a document (checked with
  Agate 3.3.25)
- an empty {{news_archive}} or {{categories_list}} leaves nothing, with its heading, so
  a site without news says so once
- images of the layout (class logo, mark or decorative, role presentation or none) leave
  no link line and the file is not copied
- the command test names files instead of counting them, and -clean and the warning
  about old files work for the gemini command too

Refs #10
2026-11-16 12:53:37 +01:00
tgiachi
2f169b8d9f feat(gemini): write the site as a Gemini capsule
`motorino gemini [-site DIR] [-out DIR] [-lang CODE] [-drafts]` turns the pages and the
news into gemtext with the new gemtext package.

- the language served by default sits at the root (-lang, then gemini_language in
  site.json, then the default language) and the others under /<code>/
- the news exist once, under /news/: index, posts, categories, archives and a
  gemlog style feed (news/feed.gmi, a date before each title)
- every page ends with the navigation of its language, the language links and, on
  translations, the machine translation note
- .meta for Agate (--central-conf): two lines per language other than the root one
  and two for the news when they are in another language, never linked
- addresses are mapped to the capsule, a fragment is dropped, a missing target stops
  the build, assets are copied only when a page points to them, gemini_web_paths
  keeps paths served by other means as links to the website
- blocks of generated lists become gemtext with the strings of the language file
- the block replacement of a page is shared with the HTML build

Refs #10
2026-11-16 12:28:10 +01:00