Skip to content

Commit

Permalink
(feat): Add base.html meta tags for frontpage
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Iranzo Gómez <Pablo.Iranzo@gmail.com>
  • Loading branch information
iranzo committed Jan 22, 2020
1 parent 2bb691d commit e493914
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions THANKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
Expand Down
8 changes: 8 additions & 0 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@
<meta name="author" content="{{ AUTHOR }}" />
{% endif %}

<!-- Fill in Site ICON-->
{% from '_includes/_defaults.html' import FEATURED_IMAGE with context %}
{% if FEATURED_IMAGE %}
<meta property="og:image" content="{{FEATURED_IMAGE}}" />
<meta name="twitter:image" content="{{FEATURED_IMAGE}}" >
{% endif %}

{% from '_includes/_defaults.html' import SITE_DESCRIPTION with context %}
{% if SITE_DESCRIPTION %}
<meta name="description" content="{% block head_description %}{{ SITE_DESCRIPTION|e }}{% endblock head_description %}" />
<meta name="twitter:description" content="{{SITE_DESCRIPTION|e}}">
{% endif %}
{% block meta_tags_in_head %}
{% from '_includes/_defaults.html' import TWITTER_USERNAME with context %}
Expand Down
7 changes: 2 additions & 5 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@
<meta name="twitter:title" content="{{ SITENAME|striptags|e }}">
{% endif %}
<meta property="og:url" content="{{ SITEURL }}" />
{% from '_includes/_defaults.html' import SITE_DESCRIPTION with context %}
{% if SITE_DESCRIPTION %}
<meta property="og:description" content="{{SITE_DESCRIPTION|e}}" />
<meta name="twitter:description" content="{{SITE_DESCRIPTION|e}}">
{% endif %}
<meta property="og:site_name" content="{{ SITENAME|striptags|e }}" />
<meta property="og:article:author" content="{{ AUTHOR }}" />
<!-- Fill in Site Keywords-->
<meta name="keywords" content="{% for tag, articles in tags|sort %} {{ tag }}, {% endfor %}" />
{% from '_includes/_defaults.html' import FEATURED_IMAGE with context %}
{% if FEATURED_IMAGE %}
<meta property="og:image" content="{{FEATURED_IMAGE}}" />
Expand Down

0 comments on commit e493914

Please sign in to comment.