aboutsummaryrefslogtreecommitdiff
path: root/_layouts
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-08-27 06:46:47 -0300
committerEuAndreh <eu@euandre.org>2020-08-27 06:46:47 -0300
commit8682faa30e60bdf78f5f00446824a48f87a74254 (patch)
tree0af82fb9f5bf541c03461918091c26abe15d4fa0 /_layouts
parentRemove IE specific meta tag (diff)
downloadeuandre.org-8682faa30e60bdf78f5f00446824a48f87a74254.tar.gz
euandre.org-8682faa30e60bdf78f5f00446824a48f87a74254.tar.xz
_layouts/default.html: Add description meta tag
Diffstat (limited to '_layouts')
-rw-r--r--_layouts/default.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/_layouts/default.html b/_layouts/default.html
index 03429a9..94ac1b7 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -12,6 +12,16 @@
<meta name="author" content="{{ site.author.name }}" />
<meta property="og:locale" content="{{ page.lang }}" />
<meta property="og:title" content="{{ page.title | xml_escape }}" />
+ {% capture raw_description %}
+ {% if page.description %}
+ {{ page.description }}
+ {% else %}
+ {{ site.description }}
+ {% endif %}
+ {% endcapture %}
+ {% assign description = raw_description | strip_html | strip %}
+ <meta name="description" content="{{ description }}" />
+ <meta property="og:description" content="{{ description }}" />
<link rel="canonical" href="{{ page.url | absolute_url }}" />
<meta property="og:url" content="{{ page.url | absolute_url }}" />