Use % instead of multiReplace for string vars.
This commit is contained in:
parent
c9901824e2
commit
0f58f5f7a0
1 changed files with 9 additions and 10 deletions
|
|
@ -250,12 +250,12 @@ proc initialise() =
|
||||||
sass.compileFile(cssLoc / "nimforum.scss", cssLoc / "nimforum.css")
|
sass.compileFile(cssLoc / "nimforum.scss", cssLoc / "nimforum.css")
|
||||||
|
|
||||||
# Read karax.html and set its properties.
|
# Read karax.html and set its properties.
|
||||||
karaxHtml = readFile("public/karax.html").multiReplace(
|
karaxHtml = readFile("public/karax.html") %
|
||||||
{
|
{
|
||||||
"$title": config.title,
|
"title": config.title,
|
||||||
"$timestamp": encodeUrl(CompileDate & CompileTime)
|
"timestamp": encodeUrl(CompileDate & CompileTime)
|
||||||
}
|
}.newStringTable()
|
||||||
)
|
|
||||||
|
|
||||||
template createTFD() =
|
template createTFD() =
|
||||||
var c {.inject.}: TForumData
|
var c {.inject.}: TForumData
|
||||||
|
|
@ -1314,12 +1314,11 @@ routes:
|
||||||
resp Http404, readFile("public/karax.html")
|
resp Http404, readFile("public/karax.html")
|
||||||
|
|
||||||
get "/about/license.html":
|
get "/about/license.html":
|
||||||
let content = readFile("public/license.rst").multiReplace(
|
let content = readFile("public/license.rst") %
|
||||||
{
|
{
|
||||||
"$hostname": config.hostname,
|
"hostname": config.hostname,
|
||||||
"$name": config.name
|
"name": config.name
|
||||||
}
|
}.newStringTable()
|
||||||
)
|
|
||||||
resp content.rstToHtml()
|
resp content.rstToHtml()
|
||||||
|
|
||||||
get "/threadActivity.xml":
|
get "/threadActivity.xml":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue