diff --git a/src/kamokan_impl/pastie_response.hpp b/src/kamokan_impl/pastie_response.hpp index 7a6b1f5..14d54b8 100644 --- a/src/kamokan_impl/pastie_response.hpp +++ b/src/kamokan_impl/pastie_response.hpp @@ -37,6 +37,7 @@ namespace kamokan { virtual std::string on_mustache_retrieve() override; virtual tawashi::HttpHeader on_general_pastie_process() override; virtual void on_general_mustache_prepare (std::string&& parPastie, mstch::map& parContext) override; + virtual bool is_pastie_page() const override { return false; } std::string m_lang_file; std::string m_langmap_dir; diff --git a/src/kamokan_impl/response.cpp b/src/kamokan_impl/response.cpp index 1215d66..976d39c 100644 --- a/src/kamokan_impl/response.cpp +++ b/src/kamokan_impl/response.cpp @@ -178,12 +178,14 @@ namespace kamokan { statuslog->info("Sending response"); SPDLOG_TRACE(statuslog, "Preparing mustache dictionary"); const bool is_submit_page = this->is_submit_page(); + const bool is_pastie_page = this->is_pastie_page(); mstch::map mustache_context { {"submit_page", is_submit_page}, {"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())} + {"host_path", make_host_path(this->settings())}, + {"pastie_page", is_pastie_page} }; m_storage.finalize_connection(); diff --git a/src/kamokan_impl/response.hpp b/src/kamokan_impl/response.hpp index a92696f..68e9320 100644 --- a/src/kamokan_impl/response.hpp +++ b/src/kamokan_impl/response.hpp @@ -71,6 +71,7 @@ namespace kamokan { virtual std::string on_mustache_retrieve(); virtual std::string default_pastie_lang(); virtual bool is_submit_page() { return false; } + virtual bool is_pastie_page() const { return false; } Storage m_storage; Kakoune::SafePtr m_cgi_env;