{% macro social_links(social_config) %}
<p>

  {% if social_config.github %}
  <a href="https://github.com/{{ social_config.github }}" target="_blank">
    <span class="icon is-large" title="GitHub">
      <i class="fab fa-github fa-lg"></i>
    </span>
  </a>
  {% endif %}

  {% if social_config.gitlab %}
  <a href="https://gitlab.com/{{ social_config.gitlab }}" target="_blank">
    <span class="icon is-large" title="GitLab">
      <i class="fab fa-gitlab fa-lg"></i>
    </span>
  </a>
  {% endif %}

  {% if social_config.keybase %}
  <a href="https://keybase.io/{{ social_config.keybase }}" target="_blank">
    <span class="icon is-large" title="Keybase">
      <i class="fab fa-keybase fa-lg"></i>
    </span>
  </a>
  {% endif %}

  {% if social_config.mastodon %}
  <a href="https://mastodon.social/{{ social_config.mastodon }}" target="_blank">
    <span class="icon is-large" title="Mastodon">
      <i class="fab fa-mastodon fa-lg"></i>
    </span>
  </a>
  {% endif %}

  {% if social_config.email %}
  <a href="mailto:{{ social_config.email }}" target="_blank">
    <span class="icon is-large" title="Email">
      <i class="far fa-envelope fa-lg"></i>
    </span>
  </a>
  {% endif %}
  
  {% if config.generate_feed %}
  <a href="{{ config.base_url }}/{{ config.feed_filename }}" target="_blank">
    <span class="icon is-large" title="RSS Feed">
      <i class="fas fa-rss fa-lg"></i>
    </span>
  </a>
  {% endif %}
</p>
{% endmacro %}

{% macro page_publish_metadata(page) %}
<span class="icon-text has-text-grey">
  <span class="icon">
    <i class="fas fa-user"></i>
  </span>
  <span>{{ config.extra.author.name }} published on</span>
  <span class="icon">
    <i class="far fa-calendar-alt"></i>
  </span>
  <span><time datetime="{{ page.date }}">{{ page.date | date(format='%B %d, %Y') }}</time></span>
</span>
{% endmacro %}

{% macro page_content_metadata(page) %}
<span class="icon-text has-text-grey">
  <span class="icon">
    <i class="far fa-clock"></i>
  </span>
  <span>{{ page.reading_time }} min,</span>
  <span class="icon">
    <i class="fas fa-pencil-alt"></i>
  </span>
  <span>{{ page.word_count }} words</span>
</span>
{% endmacro %}

{% macro render_categories(categories) %}
<p>
  Categories:
  {% for category in categories %}
  <a class="has-text-info-dark has-text-weight-semibold" href="{{ get_taxonomy_url(kind="categories", name=category) }}">
    <span class="icon-text">
      <span class="icon">
        <i class="fas fa-cube"></i>
      </span>
      <span>{{category}}</span>
    </span>
  </a>
  {% endfor %}
</p>
{% endmacro %}

{% macro render_tags(tags) %}
<p>
  Tags:
  {% for tag in tags %}
  <a class="has-text-info-dark has-text-weight-semibold" href="{{ get_taxonomy_url(kind='tags', name=tag) }}">
    <span class="icon-text">
      <span class="icon">
        <i class="fas fa-tag"></i>
      </span>
      <span>{{tag}}</span>
    </span>
  </a>
  {% endfor %}
</p>
{% endmacro %}