From 0b5215c0f5530e29810deb71e2a27042c3e1284b Mon Sep 17 00:00:00 2001 From: Frederic Hemberger Date: Wed, 21 Sep 2011 10:08:38 +0200 Subject: Adds first 150 chars of content as meta description, if no page.description specified. Fixes #162 --- .themes/classic/source/_includes/head.html | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to '.themes/classic') diff --git a/.themes/classic/source/_includes/head.html b/.themes/classic/source/_includes/head.html index be371e92..5d817657 100644 --- a/.themes/classic/source/_includes/head.html +++ b/.themes/classic/source/_includes/head.html @@ -6,18 +6,16 @@ {% if page.title %}{{page.title}} - {% endif %}{{site.title}} - {% if page.description %} - - {% endif %} + + {% capture description %}{% if page.description %}{{ page.description }}{% else %}{{ content | raw_content }}{% endif %}{% endcapture %} + + {% if page.keywords %}{% endif %} - {% if page.keywords %} - - {% endif %} {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' }}{% endif %}{% endcapture %} -- cgit v1.2.1