fkin finally

This commit is contained in:
2025-08-21 23:23:14 +01:00
parent 217adf91e9
commit 6360b41e9a
10 changed files with 112 additions and 254 deletions

View File

@@ -7,12 +7,19 @@
class Templating {
public:
Templating(const std::string& template_dir) : inja_env{template_dir} {}
explicit Templating(const std::string& template_dir);
crow::response render_template(const std::string& template_name, const inja::json& data);
crow::response render_template(const std::string& template_name);
std::string render_template_string(const std::string& template_name, const inja::json& data);
std::string render_template_string(const std::string& template_name);
private:
inja::Environment inja_env;
std::string template_dir; // absolute path to templates
std::string preprocess_template(const std::string& template_name);
};
#endif
#endif