<aside class="sidebar">
  {% if SIDEBAR_IMAGE %}
  <section>
	  <img src="{{ SITEURL }}/{{ SIDEBAR_IMAGE }}" alt="{{ SIDEBAR_IMAGE_ALT}}" width="{{SIDEBAR_IMAGE_WIDTH}}"/> 
  </section>
  {% endif %}
  <section>
    <h1>Recent Posts</h1>
    <ul id="recent_posts">
      {% for article in articles[:5] %}
      <li class="post">
          <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title|striptags }}</a>
      </li>
      {% endfor %}
    </ul>
  </section>
  {% if categories %}
  <section>
      
    <h1>Categories</h1>
    <ul id="recent_posts">
      {% for category, articles in categories %}
        <li><a href="{{ SITEURL }}/{{ category.url }}">{{ category }}</a></li>
      {% endfor %}
    </ul>
  </section>
  {% endif %} 

  <section>
  <h1>Tags</h1>
  {% for tag, article in tags %}
    <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %},{% endif %}
  {% endfor %}
  </section>

  {% include '_includes/github.html' %}
  {% include '_includes/social.html' %}
  {% include '_includes/links.html' %}
  {% include '_includes/twitter_sidebar.html' %}
  {% include '_includes/gplus_sidebar.html' %}
</aside>
