GEML
GEML (GEnerator Markdown Language) is a simple string-orientated ml parser, made with regex, designed to be used with static site generators using HTML templates. Each entry is structured as a title (which is surrounded by $
when serialized), a map of tags (specified like rust attributes), and the text itself. A GemlFile is a vector of these combined with some metadata. As such, it can compile to HTML, and has it's own (somewhat limited) markdown parser.
Usage
To deserialize a GEML file, you can use the GemlFile::from_string
or from_path
functions: (Note that you have to specify a root path if reading from a string)
let geml = String from;
let deserialized = from_string.unwrap;
You can also serialize a vector of raw GEML using Geml::deserialize
:
let geml = String from;
let deserialized = Geml:deserialize.unwrap;
The main idea behind GEML is that the SSG looks for GEML-style titles in an HTML template, and then replaces them with the corresponding GEML's value.
So the template:
$test1$
Would become:
Note that markdown is enabled by default.
markdown , cool.