1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2025-08-07 12:59:45 +00:00

Expose Tawashi's version to mustache.

This commit is contained in:
King_DuckZ 2017-06-12 20:35:52 +01:00
parent 6c357f1dc7
commit a912b1e3d4
4 changed files with 59 additions and 1 deletions

View file

@ -24,6 +24,7 @@
#include "cgi_env.hpp"
#include "num_conv.hpp"
#include "kamokan_config.h"
#include "version.hpp"
#include <utility>
#include <cassert>
#include <fstream>
@ -172,7 +173,8 @@ namespace tawashi {
statuslog->info("Sending response");
SPDLOG_TRACE(statuslog, "Preparing mustache dictionary");
mstch::map mustache_context {
{"version", std::string{STRINGIZE(VERSION_MAJOR) "." STRINGIZE(VERSION_MINOR) "." STRINGIZE(VERSION_PATCH)}},
{"version", boost::string_view{STRINGIZE(VERSION_MAJOR) "." STRINGIZE(VERSION_MINOR) "." STRINGIZE(VERSION_PATCH)}},
{"tawashi_version", tawashi::version()},
{"base_uri", base_uri()},
{"host_path", make_host_path(this->settings())},
{"languages", make_mstch_langmap(*m_settings)}