From 23b36d4268e7b0c90c99f23e2d565a58a3534463 Mon Sep 17 00:00:00 2001 From: Zed Date: Sun, 9 Jan 2022 23:55:17 +0100 Subject: [PATCH] Prevent bad staticDir from causing problems --- src/views/about.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/about.nim b/src/views/about.nim index 44dc41b..e7e8de9 100644 --- a/src/views/about.nim +++ b/src/views/about.nim @@ -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 = "

About page is missing



" proc renderAbout*(): VNode =