templating

This commit is contained in:
2025-08-21 21:15:21 +01:00
parent a7404fed3d
commit 217adf91e9
16 changed files with 58 additions and 10 deletions

18
include/templating.hpp Normal file
View File

@@ -0,0 +1,18 @@
#ifndef TEMPLATING_HPP
#define TEMPLATING_HPP
#include <inja/inja.hpp>
#include <crow.h>
#include <string>
class Templating {
public:
Templating(const std::string& template_dir) : inja_env{template_dir} {}
crow::response render_template(const std::string& template_name, const inja::json& data);
crow::response render_template(const std::string& template_name);
private:
inja::Environment inja_env;
};
#endif