Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

erb but for c

For use with kore

Make a views directory outside your source directory, and put example.cerb in it. Then run cerb, and use it like this

	#include <views.h>
	// ...
	char* result = Cerb(example, Local(test, "some value"));
	http_response(req, 200, result, strlen(result));
	// do NOT free result here
	return KORE_RESULT_OK;

It should look something like this

You can use an inline struct ((cerb_local) {"test", "value"}) instead of the Local macro for the same effect, or for dynamically generated local names.

You'll have to rerun cerb every time you change your view

About

Fast templating engine in C

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages