forked from Mirrors/keyoxide-web
Fix missing env variable
This commit is contained in:
parent
0b1674753c
commit
7deb66c8e0
1 changed files with 2 additions and 1 deletions
|
@ -68,11 +68,12 @@ router.get('/guides', (req, res) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
router.get('/guides/:guideId', (req, res) => {
|
router.get('/guides/:guideId', (req, res) => {
|
||||||
|
let env = {};
|
||||||
let rawContent = fs.readFileSync(`./content/guides/${req.params.guideId}.md`, "utf8", (err, data) => {
|
let rawContent = fs.readFileSync(`./content/guides/${req.params.guideId}.md`, "utf8", (err, data) => {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
return data;
|
return data;
|
||||||
});
|
});
|
||||||
const content = md.render(rawContent);
|
const content = md.render(rawContent, env);
|
||||||
res.render(`basic`, { title: `${env.title} - Keyoxide`, content: content });
|
res.render(`basic`, { title: `${env.title} - Keyoxide`, content: content });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue