make html <title></title> configurable

This commit is contained in:
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