Improve web preview
This commit is contained in:
parent
6237460f77
commit
2677782286
|
@ -127,7 +127,8 @@ proc createTimelineRouter*(cfg: Config) =
|
||||||
resp renderMain(html, prefs, cfg.title, title, desc, path, images = @[thumb],
|
resp renderMain(html, prefs, cfg.title, title, desc, path, images = @[thumb],
|
||||||
`type`="video", video=vidUrl)
|
`type`="video", video=vidUrl)
|
||||||
else:
|
else:
|
||||||
resp renderMain(html, prefs, cfg.title, title, desc, path, images=conversation.tweet.photos)
|
resp renderMain(html, prefs, cfg.title, title, desc, path,
|
||||||
|
images=conversation.tweet.photos, `type`="photo")
|
||||||
|
|
||||||
get "/i/web/status/@id":
|
get "/i/web/status/@id":
|
||||||
redirect("/i/status/" & @"id")
|
redirect("/i/status/" & @"id")
|
||||||
|
|
|
@ -43,7 +43,7 @@ proc renderMain*(body: VNode; prefs: Prefs; title="Nitter"; titleText=""; desc="
|
||||||
meta(property="og:type", content=`type`)
|
meta(property="og:type", content=`type`)
|
||||||
meta(property="og:title", content=titleText)
|
meta(property="og:title", content=titleText)
|
||||||
meta(property="og:description", content=desc)
|
meta(property="og:description", content=desc)
|
||||||
meta(property="og:site_name", content="Twitter")
|
meta(property="og:site_name", content="Nitter")
|
||||||
|
|
||||||
for url in images:
|
for url in images:
|
||||||
meta(property="og:image", content=getPicUrl(url))
|
meta(property="og:image", content=getPicUrl(url))
|
||||||
|
|
Loading…
Reference in New Issue