glemini/gemtext
A helper module for generating gemtext.
Example:
[
heading1("Welcome to Glemini!"),
text("This is a simple gemini server library"),
link_with_caption("gemini://geminiprotocol.net", "Gemini Website"),
]
|> lines_to_string
Results in:
# Welcome to Glemini!
This is a simple gemini server library
=> gemini://geminiprotocol.net Gemini Website
Types
Functions
pub fn blank_line() -> Line
pub fn line_to_string(line: Line) -> String
Convert a gemtext line into a string.
pub fn lines_to_string(lines: List(Line)) -> String
Convert a list of gemtext lines into a string.
pub fn link_with_caption(uri: String, text: String) -> Line
pub fn preformatted(text: String) -> Line
pub fn preformatted_with_caption(
text: String,
caption: String,
) -> Line