File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change 18
18
< meta property ="og:image " content ="{{ "/img/social-preview.jpg" | prepend: site.url }}" />
19
19
< meta name ="twitter:image " content ="{{ "/img/social-preview.jpg" | prepend: site.url }}" />
20
20
{% endif %}
21
- < meta name ="og:description " content ="{% if page.description %}
22
- {{ page.description | strip_html | strip_newlines | truncate: 160 }}
23
- {% else %}
24
- {{ site.description }}
25
- {% endif %} ">
21
+
22
+ <!-- html_description is a Jekyll variable,
23
+ the "-" dashes tell Jekyll to ignore whitespace -->
24
+ {%- capture html_description -%}
25
+ {%- if page.description -%}
26
+ {{- page.description | strip_html | strip_newlines | truncate: 160 -}}
27
+ {%- else -%}
28
+ {{- site.description -}}
29
+ {%- endif -%}
30
+ {%- endcapture %}
31
+ < meta name ="og:description " content ="{{ html_description }} ">
32
+ <!-- temp separator -->
26
33
< meta property ="og:locale " content ="en_US " />
27
34
< meta name ="twitter:card " content ="summary_large_image ">
28
35
< meta name ="twitter:domain " content ="natrongithub.github.io ">
29
36
< meta name ="twitter:title " content ="{{page.title}} ">
30
- < meta name ="twitter:description " content ="{% if page.description %}
31
- {{ page.description | strip_html | strip_newlines | truncate: 160 }}
32
- {% else %}
33
- {{ site.description }}
34
- {% endif %} ">
37
+ < meta name ="twitter:description " content ="{{ html_description }} ">
38
+ < meta name ="description " content ="{{ html_description }} ">
35
39
<!-- RSS Feed -->
36
40
< link rel ="alternate " type ="application/rss+xml " href ="{% base %}feed.atom ">
37
41
You can’t perform that action at this time.
0 commit comments