1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-04 15:29:59 +00:00

Add share details metadata

This commit is contained in:
Webysther Sperandio 2024-11-08 13:23:44 +01:00 committed by GitHub
parent f0b770224a
commit 38a7454e7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,6 +8,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta property="og:type" content="book" />
{% if entry %}
<meta property="og:title" content="{{ entry.title|truncate(35) }}" />
{% if entry.comments|length > 0 and entry.comments[0].text|length > 0 %}
<meta property="og:description" content="{{ entry.comments[0].text|striptags|truncate(65) }}" />
{% endif %}
<meta property="og:image" content="{{url_for('web.get_cover', book_id=entry.id, resolution='og', c=entry|last_modified)}}" />
{% endif %}
{% if g.google_site_verification|length > 0 %}
<meta name="google-site-verification" content="{{g.google_site_verification}}">
{% endif %}