Skip to content

Commit

Permalink
Rewrite README with info on gmnhg
Browse files Browse the repository at this point in the history
  • Loading branch information
tdemin committed Nov 18, 2020
1 parent 8c1a9a3 commit b660e0b
Showing 1 changed file with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions README.md
Expand Up @@ -9,21 +9,35 @@ simpler.
[Gemini]: https://gemini.circumlunar.space
[Gemtext]: https://gemini.circumlunar.space/docs/specification.html

At this stage of development this repo contains the actual renderer
(`internal/gemini`) and the `md2gmn` program that converts Markdown
input to Gemtext and is supposed to facilitate testing.

The renderer is somewhat hasty, and is NOT supposed to be able to
convert the entirety of possible Markdown to Gemtext (as it's not
possible to do so, considering Gemtext is a lot simpler than Markdown),
but instead a selected subset of it, enough for conveying your mind in
Markdown.

The renderer uses the [gomarkdown][gomarkdown] library for parsing
Markdown.
Markdown. gomarkdown has a few quirks at this time, the most notable one
being unable to parse links/images inside other links.

[gomarkdown]: https://github.com/gomarkdown/markdown

## gmnhg

This program converts Hugo Markdown content files from `content/` in
accordance with templates found in `layouts/gmnhg` to the output dir. It
also copies static files from `static/` to the output dir.

For more details about the rendering process, see the
[doc](cmd/gmnhg/main.go) attached to the program.

```
Usage of gmnhg:
-output string
output directory (will be created if missing) (default "output/")
-working string
working directory (defaults to current directory)
```

## md2gmn

This program reads Markdown input from either text file (if `-f
Expand All @@ -35,15 +49,11 @@ Usage of md2gmn:
input file
```

## TODO

+ [x] convert Markdown text to Gemtext
+ [x] prepend contents of YAML front matter to Gemtext data
+ [ ] render all Hugo content files to Gemtext in accordance with front
matter data and Hugo config
md2gmn is mainly made to facilitate testing the Gemtext renderer but
can be used as a standalone program as well.

## License

This program is redistributed under the terms and conditions of the GNU
General Public License, more specifically under version 3 of the
License. For details, see [COPYING](COPYING).
General Public License, more specifically version 3 of the License. For
details, see [COPYING](COPYING).

0 comments on commit b660e0b

Please sign in to comment.