3 ms·
It's a good idea to reduce templating languages into a simpler form, I'll agree to that, but the issue here is that you still need loops and data input. For ex
by evrimoztamur 3y ago
It's a good idea to reduce templating languages into a simpler form, I'll agree to that, but the issue here is that you still need loops and data input.
For example, the test script has a 'li' function but <li>s are list items and they reside, usually more than one, inside <ol> or <ul> elements. At the very least, there should be a way to take some form of data file (list of blog posts and nested metadata) an iterate over it. Otherwise you're just writing whatever markup you want as the output, with an additional layer, and nothing of added value.
Otherwise what, template the slisp in Jinja too?
- 0x3444ac53 3y agoThis is true. In the spirit of the project it might be good to add a predefined map function. `(map li (eval "cat file"))` Where `file` is newline separated text, and li is applied to each line, and the full string is returned. For this example ``` (func ul "<ul>{0}< /ul>") (func li "<li>{0}< /li>") (ul (map li (eval "cat file"))) ``` Would return each line of the file nested in a `li` tag nested in a `ul`
- 0x3444ac53 3y agoAdded a map function https://github.com/0x3444ac53/HCSL/commit/790ba4d8b18cd0fd6f0ef8e5929ccb2112410165 https://github.com/0x3444ac53/HCSL/commit/790ba4d8b18cd0fd6f...