mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-13 03:26:30 +00:00
Prevent bad staticDir from causing problems
This commit is contained in:
parent
4ec2874008
commit
23b36d4268
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
import strformat
|
||||
import os, strformat
|
||||
import karax/[karaxdsl, vdom]
|
||||
|
||||
const
|
||||
|
@ -12,9 +12,9 @@ var aboutHtml: string
|
|||
|
||||
proc initAboutPage*(dir: string) =
|
||||
try:
|
||||
aboutHtml = readFile(&"{dir}/md/about.html")
|
||||
aboutHtml = readFile(dir/"md/about.html")
|
||||
except IOError:
|
||||
stderr.write &"{dir}/about.html not found, please run `nimble md`\n"
|
||||
stderr.write (dir/"md/about.html") & " not found, please run `nimble md`\n"
|
||||
aboutHtml = "<h1>About page is missing</h1><br><br>"
|
||||
|
||||
proc renderAbout*(): VNode =
|
||||
|
|
Loading…
Reference in a new issue