Skip to content
Snippets Groups Projects
Commit 468eb02f authored by syuilo's avatar syuilo
Browse files

Set title of a doc

parent dfca7f13
No related branches found
No related tags found
No related merge requests found
......@@ -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)));
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment