Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skywa04885/fannst-templating-engine
Fast and reliable templating engine for C++
https://github.com/skywa04885/fannst-templating-engine
Last synced: 8 days ago
JSON representation
Fast and reliable templating engine for C++
- Host: GitHub
- URL: https://github.com/skywa04885/fannst-templating-engine
- Owner: skywa04885
- License: apache-2.0
- Created: 2020-04-25T20:13:13.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-29T09:10:15.000Z (over 4 years ago)
- Last Synced: 2024-11-12T00:37:07.910Z (2 months ago)
- Language: C++
- Size: 46.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
![Fannst Banner](static/fannst-banner.png)
# Simple C++ Templating Engine - High performance target
### Syntax Example:
```html
{%= $title %}
{%= $var %}
{%= $bool %}
```## Syntax Rules
1. Each command starts with ```{%``` and ends with ```%}```
1. The first char inside a command, should represent the type of operation, for supported operations,
see section "Supported Operations"
1. Each functional operation requires an label, for more information see section "Functional Operations"## Supported Operations
* ```=``` Insert Text, HTML Tags will be processed into HTML Entities
* ```-``` Insert HTML, no preprocessing performed
* ```:``` Functional operation, will contain if statements and loops## Functional Operations
### Rules
1. Each functional operation requires an label, this can be specified in this
manner: ```{%: labelName | if $bool %}```
1. Labels may be created using alpha numerical characters A-Z, a-z
1. After each label, and ```|``` is required, in order to indicate that the statement is comming
1. Due to performance, booleans are the _only_ supported statement operands### Examples
#### If statement
```html
{%: shouldShowParagraph | if $bool %}
{%= $text %}
{%: shouldShowParagraph | endif %}
```#### Includes from other files
```html{%- include "nav.html" %}
{%= $title %}
{%- include "footer.html" %}```
## Variable Insertions
### Supported variables
* Booleans
* ```const char *```'s
* Double's
* Float's
* Integer's
* Long's## Developers
|Name |Github |Website |
|--------------|-----------------------------------------------|-----------------------------------------|
|Luke Rieff |[skywa04885](https://github.com/skywa04885) |[me.fannst.nl](https://me.fannst.nl) |Want to become an developer for Fannst Software ?
Feel free to contact us for more information, keep in mind that you will be doing
this as a volunteer, and will not get payed. Click [Here](https://software.fannst.nl) to get in touch.---