From 7deb66c8e0f00112574bf21d2f175137b3308804 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Mon, 31 Aug 2020 07:25:06 +0200 Subject: [PATCH] Fix missing env variable --- routes/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/routes/main.js b/routes/main.js index 7850b1b..50220ed 100644 --- a/routes/main.js +++ b/routes/main.js @@ -68,11 +68,12 @@ router.get('/guides', (req, res) => { }); router.get('/guides/:guideId', (req, res) => { + let env = {}; let rawContent = fs.readFileSync(`./content/guides/${req.params.guideId}.md`, "utf8", (err, data) => { if (err) throw err; return data; }); - const content = md.render(rawContent); + const content = md.render(rawContent, env); res.render(`basic`, { title: `${env.title} - Keyoxide`, content: content }); });