From 036c3266a5411b6adc97b59b7f1cf678b18a7780 Mon Sep 17 00:00:00 2001 From: Luca Chiricozzi Date: Thu, 1 Jan 2015 21:06:34 +0100 Subject: [PATCH] Some SEO improvement --- templates/archives.html | 10 +++-- templates/article.html | 38 +++++++++++++++++- templates/author.html | 4 +- templates/base.html | 81 ++++++++++++--------------------------- templates/categories.html | 2 + templates/category.html | 4 +- templates/common_seo.html | 13 +++++++ templates/index.html | 41 +++++++++++++------- templates/page.html | 22 ++++++++++- templates/tag.html | 2 + templates/tags.html | 2 + 11 files changed, 138 insertions(+), 81 deletions(-) create mode 100644 templates/common_seo.html diff --git a/templates/archives.html b/templates/archives.html index 16b7cbd..1575c17 100644 --- a/templates/archives.html +++ b/templates/archives.html @@ -2,17 +2,19 @@ {% block title %}Archives{% endblock %} {% block description %}{% endblock %} +{% include 'common_seo.html' %} + {% block content %}

Archives

{% for article in dates %} -
- {{ article.title }} +
+ {{ article.title }} -

{{ article.summary }}

+

{{ article.summary }}


{% endfor %} diff --git a/templates/article.html b/templates/article.html index af680d3..d3ad625 100644 --- a/templates/article.html +++ b/templates/article.html @@ -1,6 +1,40 @@ {% extends "base.html" %} {% block title %}{{ article.title|striptags }}{% endblock %} {% block description %}{{ article.summary|striptags }}{% endblock %} +{% block seo %} + + + + + + +{% if article.summary %} + + +{% endif %} +{% if article.date %} + +{% endif %} +{% if article.modified %} + +{% endif %} +{% if article.author %} + +{% endif %} +{% for tag in article.tags %} + +{% endfor %} +{% if article.image %} + + +{% elif OG_IMAGE%} + + + +{% endif %} + +{% endblock %} + {% block content %}
@@ -24,7 +58,7 @@
-
+

{{ article.title }}

@@ -35,7 +69,7 @@ {% endif %}

{{ article.summary|striptags }}

-
{{ article.content }}
+
{{ article.content }}

diff --git a/templates/author.html b/templates/author.html index abc9663..f89da67 100644 --- a/templates/author.html +++ b/templates/author.html @@ -1,3 +1,5 @@ {% extends "index.html" %} -{% block title %}{{ SITENAME }} | {{ author }}{% endblock %} +{% block title %}{{ author }}{% endblock %} {% block description %}{% endblock %} + +{% include 'common_seo.html' %} diff --git a/templates/base.html b/templates/base.html index f6aaf1d..a43e39d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,87 +1,54 @@ - - - - + + + + -{% block title %}{{ SITENAME }}{%endblock%} +{% block title %}{{ SITENAME }}{% endblock %} - + + -{% if article %} - - - - - -{% if article.summary %} - - -{% endif %} -{% if article.date %} - -{% endif %} -{% if article.modified %} - -{% endif %} -{% if article.author %} - -{% endif %} -{% for tag in article.tags %} - -{% endfor %} -{% if article.image %} - - -{% endif %} -{% elif page %} - - - - -{% if page.image %} - - -{% endif %} -{% if page.summary %} - - -{% endif %} -{% else %} +{% block seo %} -{% if SITE_DESCRIPTION %} - - +{% if DESCRIPTION %} + + {% endif %} {% if OG_IMAGE %} - + {% endif %} -{% endif %} - - +{% endblock %} + - + + +
+ + +
+
@@ -131,7 +98,7 @@

Receive Updates

- ATOM + ATOM
{% if SOCIAL %} @@ -157,7 +124,7 @@
-
  • +
  • {% if SOCIAL %} {% for icon, link in SOCIAL %}
  • @@ -170,7 +137,7 @@

    {{ FOOTER }}

    -

    Powered by Pelican. Theme mg by Luca Chiricozzi.

    +

    Powered by Pelican.
    Theme mg by Luca Chiricozzi.

  • diff --git a/templates/categories.html b/templates/categories.html index 675868f..0dbfb27 100644 --- a/templates/categories.html +++ b/templates/categories.html @@ -2,6 +2,8 @@ {% block title %}Categories{% endblock %} {% block description %}{% endblock %} +{% include 'common_seo.html' %} + {% block content %}

    Categories

    diff --git a/templates/category.html b/templates/category.html index 81c9cdb..731bf0a 100644 --- a/templates/category.html +++ b/templates/category.html @@ -1,3 +1,5 @@ {% extends "index.html" %} -{% block title %}{{ SITENAME }} | {{ category|capitalize }}{% endblock %} +{% block title %}{{ category|capitalize }}{% endblock %} {% block description %}{% endblock %} + +{% include 'common_seo.html' %} diff --git a/templates/common_seo.html b/templates/common_seo.html new file mode 100644 index 0000000..f47d6a8 --- /dev/null +++ b/templates/common_seo.html @@ -0,0 +1,13 @@ +{% block seo %} + + + + +{% if OG_IMAGE %} + + + +{% endif %} +{% endblock %} + + diff --git a/templates/index.html b/templates/index.html index 4df0fa3..34d4785 100644 --- a/templates/index.html +++ b/templates/index.html @@ -6,26 +6,39 @@ {% if articles %} {% for article in articles %} -
    - {{ article.title }} - + {% if loop.index == 1 %} +
    + {{ article.title }} +

    -

    {{ article.summary|striptags }}

    +

    {{ article.summary|striptags }}

    +
    {{ article.content }}
    + +
    +
    + {% else %} + +
    + {% endif %} - {% if DEFAULT_PAGINATION and articles_paginator.num_pages > 1 %} - - {% endif %} {% endfor %} +{% if DEFAULT_PAGINATION and articles_paginator.num_pages > 1 %} + +{% endif %} + {% endif %}
    {% endblock %} diff --git a/templates/page.html b/templates/page.html index 0071d99..0a9aafd 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,6 +1,26 @@ {% extends "base.html" %} {% block title %}{{ page.title|capitalize }}{% endblock %} {% block description %}{% endblock %} + +{% block seo %} + + + + +{% if page.image %} + + +{% elif OG_IMAGE %} + + + +{% endif %} +{% if page.summary %} + + +{% endif %} +{% endblock %} + {% block content %}

    {{ page.title }}

    @@ -10,6 +30,4 @@ {{ page.content }}
    - - {% endblock %} diff --git a/templates/tag.html b/templates/tag.html index f73fbbf..a22947e 100644 --- a/templates/tag.html +++ b/templates/tag.html @@ -1,3 +1,5 @@ {% extends "index.html" %} {% block title %}{{ SITENAME }} | {{ tag|capitalize }}{% endblock %} {% block description %}{% endblock %} + +{% include 'common_seo.html' %} diff --git a/templates/tags.html b/templates/tags.html index a234a02..b137cf9 100644 --- a/templates/tags.html +++ b/templates/tags.html @@ -2,6 +2,8 @@ {% block title %}Tags{% endblock %} {% block description %}{% endblock %} +{% include 'common_seo.html' %} + {% block content %}

    Tags