mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-05 16:39:49 +00:00
Merge pull request #2418 from wallabag/add-twitter-cards
Added support of Twitter Cards for public articles
This commit is contained in:
commit
0ff674a952
1 changed files with 7 additions and 3 deletions
|
@ -30,11 +30,15 @@
|
|||
<meta property="og:title" content="{{ entry.title | raw }}" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="{{ app.request.uri }}" />
|
||||
{% set picturePath = app.request.schemeAndHttpHost ~ asset('bundles/wallabagcore/themes/_global/img/logo-other_themes.png') %}
|
||||
{% if entry.previewPicture is not null %}
|
||||
<meta property="og:image" content="{{ entry.previewPicture }}" />
|
||||
{% else %}
|
||||
<meta property="og:image" content="{{ app.request.schemeAndHttpHost }}{{ asset('bundles/wallabagcore/themes/_global/img/logo-other_themes.png') }}" />
|
||||
{% set picturePath = entry.previewPicture %}
|
||||
{% endif %}
|
||||
<meta property="og:image" content="{{ picturePath }}" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:image" content="{{ picturePath }}" />
|
||||
<meta name="twitter:site" content="@wallabagapp" />
|
||||
<meta name="twitter:title" content="{{ entry.title | raw }}" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
|
|
Loading…
Reference in a new issue