Crates.io | gema_texto |
lib.rs | gema_texto |
version | |
source | src |
created_at | 2025-01-04 22:30:36.435791+00 |
updated_at | 2025-03-06 19:52:40.77856+00 |
description | Library to parse gemtext and render HTML |
homepage | https://git.sr.ht/~rbdr/gema_texto |
repository | |
max_upload_size | |
id | 1504282 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
gema_texto
parses gemtext and renders html.
This library powers blog and page, so it makes some decisions on for those projects. Here's how each line is handled:
<section>
tag.<p>
, even empty ones.<p>
and .gmi files are changed to .html unless the
URL starts with gemini:<pre>
tag.<ul>
and rendered as <li>
tags.<blockquote>
More in-depth usage docs in the source. This is an overview of the included functionality.
gemini_parser
deals with parsing the gemini file itself.html_renderer
takes a parsed gemini file and renders it to html.gema_texto::gemini_parser::GeminiLine
An enum
that represents the six different types of lines in gemtext.
gema_texto::gemini_parser::parse
Parses a &str
of gemtext source and returns a Vec<GeminiLine>
.
gema_texto::html_renderer::render_html
Renders a Vec<GeminiLine>
into some html String