| cmd | ||
| lib | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main.go | ||
| README.md | ||
Lykso's Markup Language
This is a first attempt at creating a markup language capable of producing natural-looking output for both Gemini and the World Wide Web.
Also renders to Markdown.
Supports all the stuff gemtext does, plus inline links, block-level images, and emphasized text when rendered to HTML.
Example
# Header level 1
## Header level 2
### Header level 3
An {inline link}1 which will render as expected in HTML and on its own line further down in gemtext.
1: gemini://lyk.so My homepage, which will render as a Gemini link here when rendering to gemtext
` ` `
Some preformatted text. (Pretend there aren't any spaces between the backticks.)
` ` `
Something *with emphasis* added.
- Supports *lists!*
- But uses dashes
- Because it saves me a keypress
> A blockquote.
!image.png A block-level image, with a required description
N.B.: The HTML renderer uses image descriptions for the image's aria-label attribute, and the gemtext renderer uses it for the link text.
Usage
lml [command]
Available Commands:
ast Show the parser's raw output.
build Renders the input file to the specified format and writes the result to the output file.
completion Generate the autocompletion script for the specified shell
ebnf Output the Extended Backus-Naur Form representation of LML's grammar.
help Help about any command
Adding a renderer
- Implement the Renderer interface in
lib/renderer.go - Add an entry for a constructor function to the
KnownRenderersmap inlib/renderer.go
See lib/geminiRenderer.go and lib/htmlRenderer.go for examples.