Fix bug
This commit is contained in:
		
							parent
							
								
									d7ac0418d7
								
							
						
					
					
						commit
						41ba06a5e6
					
				
					 3 changed files with 10 additions and 4 deletions
				
			
		|  | @ -143,7 +143,11 @@ router.get('/@:user', async (ctx, next) => { | |||
| 	}); | ||||
| 
 | ||||
| 	if (user != null) { | ||||
| 		await ctx.render('user', { user }); | ||||
| 		const meta = await fetchMeta(); | ||||
| 		await ctx.render('user', { | ||||
| 			user, | ||||
| 			instanceName: meta.name | ||||
| 		}); | ||||
| 		ctx.set('Cache-Control', 'public, max-age=180'); | ||||
| 	} else { | ||||
| 		// リモートユーザーなので
 | ||||
|  | @ -179,9 +183,11 @@ router.get('/notes/:note', async ctx => { | |||
| 
 | ||||
| 		if (note) { | ||||
| 			const _note = await packNote(note); | ||||
| 			const meta = await fetchMeta(); | ||||
| 			await ctx.render('note', { | ||||
| 				note: _note, | ||||
| 				summary: getNoteSummary(_note) | ||||
| 				summary: getNoteSummary(_note), | ||||
| 				instanceName: meta.name | ||||
| 			}); | ||||
| 
 | ||||
| 			if (['public', 'home'].includes(note.visibility)) { | ||||
|  |  | |||
|  | @ -6,7 +6,7 @@ block vars | |||
| 	- const url = `${config.url}/notes/${note.id}`; | ||||
| 
 | ||||
| block title | ||||
| 	= `${title} | ${config.name}` | ||||
| 	= `${title} | ${instanceName}` | ||||
| 
 | ||||
| block desc | ||||
| 	meta(name='description' content= summary) | ||||
|  |  | |||
|  | @ -6,7 +6,7 @@ block vars | |||
| 	- const img = user.avatarUrl || null; | ||||
| 
 | ||||
| block title | ||||
| 	= `${title} | ${config.name}` | ||||
| 	= `${title} | ${instanceName}` | ||||
| 
 | ||||
| block desc | ||||
| 	meta(name='description' content= user.description) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue