fix ogp rendering and refactor

This commit is contained in:
syuilo 2022-04-17 21:18:18 +09:00
parent ce51ef5df5
commit d338ea2591
10 changed files with 51 additions and 37 deletions

View file

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