---
layout: default
title: Home
---

<div class="posts">
  {% for post in paginator.posts %}
  <div class="post">
    <h1 class="post-title">
      <a href="{{ site.url }}/{{ site.baseurl }}/{{ post.url }}">
        {{ post.title }}
      </a>
    </h1>
    
    <span class="post-date">{{ post.date | date_to_string }}</span>
    {% include share_buttons.html %}
    {{ post.content }}
  </div>
  {% endfor %}
</div>

<div class="pagination">
  {% if paginator.next_page %}
    <a class="pagination-item older" href="{{ site.baseurl }}/page{{paginator.next_page}}">Older</a>
  {% else %}
    <span class="pagination-item older">Older</span>
  {% endif %}
  {% if paginator.previous_page %}
    {% if paginator.page == 2 %}
      <a class="pagination-item newer" href="{{ site.baseurl }}/">Newer</a>
    {% else %}
      <a class="pagination-item newer" href="{{ site.baseurl }}/page{{paginator.previous_page}}">Newer</a>
    {% endif %}
  {% else %}
    <span class="pagination-item newer">Newer</span>
  {% endif %}
</div>

---
layout: default
title: Home
---

<div class="posts">
  {% for post in paginator.posts %}
  <div class="post">
    <h1 class="post-title">
      <a href="{{ site.url }}/{{ site.baseurl }}/{{ post.url }}">
        {{ post.title }}
      </a>
    </h1>
    
    <span class="post-date">{{ post.date | date_to_string }}</span>
	{{ post.excerpt }} 
    {% capture content_words %} 
      {{ post.content | number_of_words }} 
    {% endcapture %} 
    {% capture excerpt_words %} 
      {{ post.excerpt | number_of_words }} 
    {% endcapture %} 
    {% if excerpt_words != content_words %}
      <p><a class="btn btn-sm btn-primary" href="{{ post.url }}/#read-more" role="button">Read more <i class="fa fa-arrow-circle-right"></i></a>
      </p>
    {% endif %}

  </div>
  {% endfor %}
</div>

<div class="pagination">
  {% if paginator.next_page %}
    <a class="pagination-item older" href="{{ site.baseurl }}/page{{paginator.next_page}}">Older</a>
  {% else %}
    <span class="pagination-item older">Older</span>
  {% endif %}
  {% if paginator.previous_page %}
    {% if paginator.page == 2 %}
      <a class="pagination-item newer" href="{{ site.baseurl }}/">Newer</a>
    {% else %}
      <a class="pagination-item newer" href="{{ site.baseurl }}/page{{paginator.previous_page}}">Newer</a>
    {% endif %}
  {% else %}
    <span class="pagination-item newer">Newer</span>
  {% endif %}
</div>

Add excerpt and "read more"
Add excerpt and "read more"

Signed-off-by: Drasko DRASKOVIC <83752d7d09cf86f69ee9aa9148577a17024773f3@gmail.com>
