fix ogp rendering and refactor
This commit is contained in:
parent
ce51ef5df5
commit
d338ea2591
10 changed files with 51 additions and 37 deletions
|
|
@ -16,7 +16,7 @@ block og
|
|||
meta(property='og:title' content= title)
|
||||
meta(property='og:description' content= clip.description)
|
||||
meta(property='og:url' content= url)
|
||||
meta(property='og:image' content= user.avatarUrl)
|
||||
meta(property='og:image' content= avatarUrl)
|
||||
|
||||
block meta
|
||||
if profile.noCrawle
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ block og
|
|||
meta(property='og:title' content= title)
|
||||
meta(property='og:description' content= summary)
|
||||
meta(property='og:url' content= url)
|
||||
meta(property='og:image' content= user.avatarUrl)
|
||||
meta(property='og:image' content= avatarUrl)
|
||||
|
||||
block meta
|
||||
if user.host || isRenote || profile.noCrawle
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ block og
|
|||
meta(property='og:title' content= title)
|
||||
meta(property='og:description' content= page.summary)
|
||||
meta(property='og:url' content= url)
|
||||
meta(property='og:image' content= page.eyeCatchingImage ? page.eyeCatchingImage.thumbnailUrl : user.avatarUrl)
|
||||
meta(property='og:image' content= page.eyeCatchingImage ? page.eyeCatchingImage.thumbnailUrl : avatarUrl)
|
||||
|
||||
block meta
|
||||
if profile.noCrawle
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ extends ./base
|
|||
block vars
|
||||
- const title = user.name ? `${user.name} (@${user.username})` : `@${user.username}`;
|
||||
- const url = `${config.url}/@${(user.host ? `${user.username}@${user.host}` : user.username)}`;
|
||||
- const img = user.avatarUrl || null;
|
||||
|
||||
block title
|
||||
= `${title} | ${instanceName}`
|
||||
|
|
@ -16,7 +15,7 @@ block og
|
|||
meta(property='og:title' content= title)
|
||||
meta(property='og:description' content= profile.description)
|
||||
meta(property='og:url' content= url)
|
||||
meta(property='og:image' content= img)
|
||||
meta(property='og:image' content= avatarUrl)
|
||||
|
||||
block meta
|
||||
if user.host || profile.noCrawle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue