Make meta description tag more descriptive
Now has the article title as well as the first 250 characters from the
article. This makes it better for copy-pasting into websites which
automatically grab the description tag and display it.
diff --git a/templates/article.html b/templates/article.html
index e094c52..5ae6011 100644
--- a/templates/article.html
+++ b/templates/article.html
@@ -11,6 +11,7 @@
{% endblock %}
{% block title %}{{ article.title }} | {{ SITENAME }}{% endblock %}
+{% block description %}{{ article.title }} | {{ article.content|striptags|truncate(250)|escape }}{% endblock %}
{% block subheader %}
<p>Posted
diff --git a/templates/base.html b/templates/base.html
index 67221f7..94d4231 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -15,7 +15,7 @@
<meta charset="utf-8" />
<meta name="viewport" id="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="{{ AUTHOR }}">
- <meta name="description" content="Posts and writings by {{ AUTHOR }}">
+ <meta name="description" content="{% block description %}Posts by {{ AUTHOR }}{% endblock %}">
{% if GOOGLE_PLUS_URL %}
<link rel="author" href="{{ GOOGLE_PLUS_URL }}?rel=author">