This commit is contained in:
syuilo 2019-02-06 22:27:23 +09:00
parent d7ac0418d7
commit 41ba06a5e6
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
3 changed files with 10 additions and 4 deletions

View file

@ -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)) {

View file

@ -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)

View file

@ -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)