feat: gate a run of blocks to chosen output formats
This commit is contained in:
parent
bb7a5111a1
commit
603f29b0f0
9 changed files with 437 additions and 22 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# 🕸 itsybitsy
|
||||
|
||||
[](LICENSE) [](https://ai-declaration.md) 
|
||||
[](LICENSE) [](https://ai-declaration.md)  [](https://github.com/jetify-com/devbox/)
|
||||
|
||||
|
||||
Serve folders of Markdown to different domains over HTTP, [Gemini](https://geminiprotocol.net/docs/specification.gmi), [Spartan](https://portal.mozz.us/gemini/spartan.mozz.us/), [Nex](https://nightfall.city/nex/info/specification.txt) and [Gopher](https://www.rfc-editor.org/rfc/rfc1436), rendered on request with no build step. One process serves many virtual hosts, each output format is a separate crate behind a cargo feature, and configuration lives in TOML files. Gemini expects TLS to be terminated in front of it; that is the one deployment requirement itsybitsy does not satisfy by itself.
|
||||
|
|
@ -64,6 +64,10 @@ Markdown is parsed once per document and rendered to every format. Everything it
|
|||
| `` | an image whose target is a text file, inlined verbatim |
|
||||
| `<!-- card Title -->` | a card divider, for formats that paginate |
|
||||
| `<!-- center -->`, `<!-- right margin=4 -->` | alignment for the block that follows |
|
||||
| `<!-- only gemtext text -->` … `<!-- end -->` | a run of blocks only those formats get |
|
||||
| `<!-- except wml -->` … `<!-- end -->` | a run of blocks every other format gets |
|
||||
|
||||
A gate names format ids, not protocols: `gemtext` is what Gemini, Spartan, Nex and Gopher all serve, so there is no "only on Gemini". Gates nest, each one closes inside the quote or list item it was opened in, and one left unclosed is refused rather than run on to the end of the page. An id this build does not provide matches nothing, so `only wml` is hidden everywhere when the `wml` feature is off — and so is a misspelled id.
|
||||
|
||||
Links should be root-relative and extensionless (`[about](/about)`), so the same link resolves identically from every protocol:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue