]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Resources/views/themes/common/Entry/share.html.twig
Added support of Twitter Cards for public articles
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Resources / views / themes / common / Entry / share.html.twig
index a0a0d3c36c2447140af57cefc09118e957d6294a..b50226ef16e5166d536fcfe49d60cf8a14707ff3 100644 (file)
         <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>