Commit graph

13 commits

Author SHA1 Message Date
Timur Demin
688d88d72b
Make the Go compiler calculate renderer flags
This makes the Go compiler automatically calculate renderer
flags bitmask values by putting 1 << iota as the first meaningful flag.
This has a downside of having the first flag always meaning 2, and not
1, whereas WithMetadata already meaned 1, therefore this is a breaking
change.
2021-08-22 23:05:49 +03:00
Timur Demin
c872e012e2
Enable gomarkdown's NoEmptyLineBeforeBlock rule
This changes gomarkdown parser behavior to allow code blocks, lists, etc
to come after other blocks (like paragraphs) and get processed as
independent blocks without a separate newline (putting gomarkdown in
charge to decide whether a new block is started).

This is a breaking change as this affects how some existing Markdown
source might get rendered. Nonetheless, this is probably the expected
default by most users. This has no configurable switch yet.

See #14.
2021-08-22 22:51:52 +03:00
Timur Demin
66b2f83a88
Migrate to GitHub 2021-08-01 04:11:04 +05:00
Timur Demin
7eaf6b7c8a
Fix #8
This fixes trailing newlines at the end of Gemtext being left.
2020-12-12 16:30:25 +05:00
Timur Demin
d89c4b5e50
Reword RenderMarkdown docstring 2020-12-12 14:06:22 +05:00
Timur Demin
47e056f253
Refactor RenderMarkdown signature
This makes the function accept a bitmask instead of a single flag. This
is a breaking change.
2020-12-12 14:03:29 +05:00
Timur Demin
1a0e61dc3f
Implement gmnhg
gmnhg is the new program that generates a Gemini site from Hugo site
content. It reads its input from content/, static/, and layouts/gmnhg/.
Its output by default goes to output/.

More doc is available in the program doc header.
2020-11-18 22:23:31 +05:00
Timur Demin
8226a20880
Change API for simpler use by gmnhg 2020-11-11 23:21:18 +05:00
Timur Demin
637ff4b71b
Rid of an unneeded check
RenderMarkdown doesn't really need an extra check on whether or not the
Markdown content size is more than a specific amount.
2020-11-11 23:21:17 +05:00
Timur Demin
9ea608670f
Clarify the subset of front matter data rendered 2020-11-11 23:21:17 +05:00
Timur Demin
b181afc5f1
Add YAML front matter parsing support
Fixes #1. Only a subset of Hugo front matter props are supported, namely
title/date.
2020-11-11 23:21:17 +05:00
Timur Demin
32ec381d73
Add README and license code under GPLv3 2020-11-11 23:21:16 +05:00
Timur Demin
4d80d36f00
Provide a public API
This also introduces a simple program, md2gmn, that is meant for testing
the renderer on Markdown files. Nonetheless, it can be used as
a standalone tool as well.
2020-11-11 23:20:52 +05:00