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…
	
	Add table
		Add a link
		
	
		Reference in a new issue