mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2025-03-04 07:18:50 -07:00
Fix bug
This commit is contained in:
parent
eec5e400f8
commit
ffcb479b3a
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
Reference in a new issue