Skip to content

Commit

Permalink
fix description meta format error
Browse files Browse the repository at this point in the history
  • Loading branch information
stiekel committed May 26, 2016
1 parent 38dd3b4 commit 5b61c61
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions layout/includes/head.swig
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
{% endif %}
{% set metaDescription = trim(strip_html(page.description || page.excerpt || page.content || config.description)) %}
{% if metaDescription.length > 200 %}
{{ truncate( metaDescription, {length: 200}) }}
<meta name="description" content="{{ truncate( metaDescription, {length: 200}) }}">
{% else %}
<meta name="description" content="{{ metaDescription }}">
{% endif %}
<meta name="description" content="{{ metaDescription }}">
<title>{{ pageTitle }}</title>
{% if config.feed || theme.feed %}
{{ feed_tag(config.feed.path || theme.feed.path, {title: config.title, type: config.feed.type || theme.feed.type}) }}
Expand Down

0 comments on commit 5b61c61

Please sign in to comment.