File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1
1
{% extends " base.twig" %}
2
2
3
+ {% set stripped = entry .contents | striptags | replace ({" \n" : ' ' })| split (' ' ) %}
4
+ {% if stripped | length >= 20 %}
5
+ {% set description = stripped | slice (0 , 20 )| join (' ' )| trim ~ " ..." %}
6
+ {% else %}
7
+ {% set description = stripped | slice (0 , 20 )| join (' ' )| trim %}
8
+ {% endif %}
9
+
3
10
{% block main %}
4
11
<div id =" front-entry-wrapper" >
5
12
<h1 id =" entry-title" >{{ entry .title }}</h1 >
56
63
{# OpenGraph Integration! #}
57
64
{% block head_extra %}
58
65
<meta property =" og:title" content =" {{ entry .title | e (' html_attr' ) }}" />
66
+ <meta name =" twitter:title" content =" {{ entry .title | e (' html_attr' ) }}" >
67
+ <meta name =" og:description" content =" {{ description | e (' html_attr' ) }}" >
68
+ <meta name =" twitter:description" content =" {{ description | e (' html_attr' ) }}" >
59
69
<meta property =" og:type" content =" website" />
60
70
<meta property =" og:url" content =" {{ faqoff_custom .vars ['hostname' ] }}/e/{{ entry .uniqueid | e (' html' ) }}" />
61
71
{% if entry .opengraph_image_url %}
62
72
<meta property =" og:image" content =" {{ entry .opengraph_image_url | e (' html_attr' ) }}" />
73
+ <meta property =" twitter:image" content =" {{ entry .opengraph_image_url | e (' html_attr' ) }}" />
63
74
{% endif %}
64
75
{% endblock %}
You can’t perform that action at this time.
0 commit comments