Improve meta tag display in templates

This commit is contained in:
Roman Shvets 2013-08-29 17:25:26 +03:00
parent 1e3cae54c5
commit 08b77b0a51
2 changed files with 6 additions and 28 deletions

View file

@ -5,20 +5,9 @@
<title>{% if meta.title %}{{ meta.title }} | {% endif %}{{ site_title }}</title>
{% if meta.description is defined %}
<meta name="description" content="{{ meta.description }}">
{% endif %}
{% if meta.keywords is defined %}
<meta name="keywords" content="{{ meta.keywords }}">
{% endif %}
{% if meta.robots is defined %}
<meta name="robots" content="{{ meta.robots }}">
{% endif %}
{% if meta.url is defined %}
<meta name="url" content="{{ meta.url }}">
{% endif %}
{% for key, val in meta if key in ['description', 'keywords', 'author', 'robots', 'url'] %}
<meta name="{{ key }}" content="{{ val }}">
{% endfor %}
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" type="text/css" />
<link rel="stylesheet" href="{{ theme_url }}/style.css" type="text/css" />

View file

@ -5,20 +5,9 @@
<title>{% if meta.title %}{{ meta.title }} | {% endif %}{{ site_title }}</title>
{% if meta.description is defined %}
<meta name="description" content="{{ meta.description }}">
{% endif %}
{% if meta.keywords is defined %}
<meta name="keywords" content="{{ meta.keywords }}">
{% endif %}
{% if meta.robots is defined %}
<meta name="robots" content="{{ meta.robots }}">
{% endif %}
{% if meta.url is defined %}
<meta name="url" content="{{ meta.url }}">
{% endif %}
{% for key, val in meta if key in ['description', 'keywords', 'author', 'robots', 'url'] %}
<meta name="{{ key }}" content="{{ val }}">
{% endfor %}
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,700" type="text/css" />
<link rel="stylesheet" href="{{ theme_url }}/style.css" type="text/css" />