Skip to content

Commit

Permalink
Merge pull request #370 from luocong123/patch-1
Browse files Browse the repository at this point in the history
如果文章front-matter里有keywords属性,则使用页面的keywords,而不是直接使用tags
  • Loading branch information
iissnan committed Sep 11, 2015
2 parents b848863 + 0c52148 commit ae20c8d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion layout/_partials/head.swig
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
<meta name="description" content="{{ config.description }}" />
{% endif %}

{% if page.tags and page.tags.length %}
{% if page.keywords %}
<meta name="keywords" content="{{ page.keywords }}" />
{% elif page.tags and page.tags.length %}
<meta name="keywords" content="{% for tag in page.tags %}{{ tag.name }},{% endfor %}" />
{% elif theme.keywords %}
<meta name="keywords" content="{{ theme.keywords }}" />
Expand Down

0 comments on commit ae20c8d

Please sign in to comment.