mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-26 22:29:28 +09:00
Fix bugs
This commit is contained in:
parent
a64817cea1
commit
650f79d0fd
@ -14,6 +14,8 @@ module.exports = async (ctx: Koa.Context) => {
|
|||||||
|
|
||||||
function wrap(url: string): string {
|
function wrap(url: string): string {
|
||||||
return url != null
|
return url != null
|
||||||
? `https://images.weserv.nl/?url=${url.replace(/^https?:\/\//, '')}`
|
? url.startsWith('https://')
|
||||||
|
? url
|
||||||
|
: `https://images.weserv.nl/?url=${url.replace(/^http:\/\//, '')}`
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@ block vars
|
|||||||
- const user = note.user;
|
- const user = note.user;
|
||||||
- const title = user.name ? `${user.name} (@${user.username})` : `@${user.username}`;
|
- const title = user.name ? `${user.name} (@${user.username})` : `@${user.username}`;
|
||||||
- const url = `${config.url}/notes/${note.id}`;
|
- const url = `${config.url}/notes/${note.id}`;
|
||||||
- const img = user.avatarId ? `${config.drive_url}/${user.avatarId}` : null;
|
|
||||||
|
|
||||||
block title
|
block title
|
||||||
= `${title} | Misskey`
|
= `${title} | Misskey`
|
||||||
@ -18,7 +17,7 @@ block meta
|
|||||||
meta(property='og:title' content= title)
|
meta(property='og:title' content= title)
|
||||||
meta(property='og:description' content= summary)
|
meta(property='og:description' content= summary)
|
||||||
meta(property='og:url' content= url)
|
meta(property='og:url' content= url)
|
||||||
meta(property='og:image' content= img)
|
meta(property='og:image' content= user.avatarUrl)
|
||||||
|
|
||||||
if note.prev
|
if note.prev
|
||||||
link(rel='prev' href=`${config.url}/notes/${note.prev}`)
|
link(rel='prev' href=`${config.url}/notes/${note.prev}`)
|
||||||
|
Loading…
Reference in New Issue
Block a user