2022-10-12 08:01:19 +00:00
|
|
|
#include "TemplatingEngine.h"
|
|
|
|
|
2022-10-20 08:00:39 +00:00
|
|
|
#include <File.h>
|
|
|
|
|
2022-10-12 08:01:19 +00:00
|
|
|
#include <filesystem>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
const auto data_loc = std::filesystem::path(__FILE__) / "../../data";
|
|
|
|
|
|
|
|
auto engine = TemplatingEngine(data_loc);
|
|
|
|
engine.loadTemplateFiles();
|
2022-10-20 08:00:39 +00:00
|
|
|
const auto content = engine.processTemplate("index");
|
2022-10-12 08:01:19 +00:00
|
|
|
|
2022-10-20 08:00:39 +00:00
|
|
|
File outfile("index.html");
|
|
|
|
outfile.WriteText(content);
|
2022-10-12 08:01:19 +00:00
|
|
|
}
|