mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
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) => {
|
||||
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 });
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue