mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-23 20:33:09 +02:00
Set title of a doc
This commit is contained in:
parent
dfca7f1340
commit
468eb02ff3
1 changed files with 2 additions and 1 deletions
|
@ -225,7 +225,8 @@ router.get('/*/*', async ctx => {
|
|||
const md = fs.readFileSync(`${__dirname}/../../../src/docs/${doc}.${lang}.md`, 'utf8');
|
||||
|
||||
await ctx.render('../../../../src/docs/article', Object.assign({
|
||||
html: conv.makeHtml(md)
|
||||
html: conv.makeHtml(md),
|
||||
title: md.match(/^# (.+?)\r?\n/)[1]
|
||||
}, await genVars(lang)));
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue