make html <title></title> configurable

此提交包含在:
2019-10-02 21:40:58 +02:00
父節點 7fc9c090ed
當前提交 1c646fa165
共有 3 個檔案被更改,包括 14 行新增4 行删除

查看文件

@@ -43,9 +43,11 @@ Response Handler::errorResponse(std::string errortitle, std::string errormessage
return {status, error.render()};
}
std::string Handler::createPageTitle(std::string append)
std::string Handler::createPageTitle(std::string title)
{
return this->handlersConfig->wikiname + " - " + append; // TODO: we might wanna make the format configurable
Varreplacer replacer("{");
replacer.addKeyValue("title", title);
return replacer.parse(this->handlersConfig->page_title_template);
}
QueryOption Handler::queryOption(const Request &r) const