Write a README for the gemtext converter
This commit is contained in:
parent
79c8c3134b
commit
c50f2481b6
|
@ -0,0 +1,16 @@
|
|||
# Gemtext in Hugo
|
||||
This patch implements gemtext (text/gemini, .gmi) as a content language for Hugo.
|
||||
This effectively lets you write pages in gemtext instead of Markdown, including front matter support and
|
||||
an (opinionated) converter to HTML.
|
||||
|
||||
## HTML conversion
|
||||
The HTML converter (implemented [here](./convert.go)) generates the following elements:
|
||||
* `p` for any sequence of non-empty text lines, where `br` is used to separate them
|
||||
* `figure` for preformatted blocks, where the actual preformatted contents are inside a `pre` tag, and the alt text is inside a `figcaption`, if present
|
||||
* `blockquote for any sequence of quote lines
|
||||
* `h1`, `h2` and `h3` for header lines
|
||||
* `ul` for both links and list lines:
|
||||
* Any sequence of non-empty link lines is output as a `ul` element with the `links` class, where each item is an `a` element prepended by a `li` tag
|
||||
* Any sequence of non-empty list lines is output as a `ul` element with the `items` class, where each item is text prepended by a `li` tag
|
||||
|
||||
For convenience in testing, a standalone version of the converter is provided [here](./standalone/).
|
Loading…
Reference in New Issue