mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-12-14 06:38:28 +09:00
Fix bug
This commit is contained in:
parent
d7ac0418d7
commit
41ba06a5e6
@ -143,7 +143,11 @@ router.get('/@:user', async (ctx, next) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (user != null) {
|
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');
|
ctx.set('Cache-Control', 'public, max-age=180');
|
||||||
} else {
|
} else {
|
||||||
// リモートユーザーなので
|
// リモートユーザーなので
|
||||||
@ -179,9 +183,11 @@ router.get('/notes/:note', async ctx => {
|
|||||||
|
|
||||||
if (note) {
|
if (note) {
|
||||||
const _note = await packNote(note);
|
const _note = await packNote(note);
|
||||||
|
const meta = await fetchMeta();
|
||||||
await ctx.render('note', {
|
await ctx.render('note', {
|
||||||
note: _note,
|
note: _note,
|
||||||
summary: getNoteSummary(_note)
|
summary: getNoteSummary(_note),
|
||||||
|
instanceName: meta.name
|
||||||
});
|
});
|
||||||
|
|
||||||
if (['public', 'home'].includes(note.visibility)) {
|
if (['public', 'home'].includes(note.visibility)) {
|
||||||
|
@ -6,7 +6,7 @@ block vars
|
|||||||
- const url = `${config.url}/notes/${note.id}`;
|
- const url = `${config.url}/notes/${note.id}`;
|
||||||
|
|
||||||
block title
|
block title
|
||||||
= `${title} | ${config.name}`
|
= `${title} | ${instanceName}`
|
||||||
|
|
||||||
block desc
|
block desc
|
||||||
meta(name='description' content= summary)
|
meta(name='description' content= summary)
|
||||||
|
@ -6,7 +6,7 @@ block vars
|
|||||||
- const img = user.avatarUrl || null;
|
- const img = user.avatarUrl || null;
|
||||||
|
|
||||||
block title
|
block title
|
||||||
= `${title} | ${config.name}`
|
= `${title} | ${instanceName}`
|
||||||
|
|
||||||
block desc
|
block desc
|
||||||
meta(name='description' content= user.description)
|
meta(name='description' content= user.description)
|
||||||
|
Loading…
Reference in New Issue
Block a user