<div id="sidebar">
  {%- if page.categories contains "upgrades" -%}
    <div id="advertisement">
      <a href="https://fastruby.io/?utm_source=blog&utm_medium=banner&utm_content=sidebar" target="_blank">
        <img id="fastruby" src="assets/images/upgrade_rails.png" alt="Upgrade your Ruby on Rails app with fastruby.io">
        <p id="ad_copy"> You need to upgrade your app to Rails 5.2. We can help with our productized consulting service. </p>
      </a>
    </div>
  {%- endif -%}
  <h2 class="category-name">Listing all tags</h2>
    {%- for post in site.posts -%}
      {%- for category in post.categories -%}
        {%- assign item = category -%}

        {%- unless tags contains item -%}
          {%- assign tags = tags | append: ';' | append: item -%}
        {%- endunless -%}
      {%- endfor -%}
    {%- endfor -%}

    {%- assign list = tags | split: ';' | sort -%}
    {%- for category in list -%}
        <h3 class="tag-name">
          <a href="{{ site.baseurl }}/tags/{{ category | replace: ' ','-' }}"
             title="Articles about {{ category | titleize | replace: '-',' ' }}">{{ category | titleize  | replace: '-',' ' }}</a>
        </h3>
    {%- endfor -%}
</div>

<div id="sidebar">
  {%- if page.categories contains "upgrades" -%}
    <div id="advertisement">
      <a href="https://fastruby.io/?utm_source=blog&utm_medium=banner&utm_content=sidebar" target="_blank">
        <img id="fastruby" src="{{site.domain_name}}{{site.baseurl}}/assets/images/upgrade_rails.png" alt="Upgrade your Ruby on Rails app with fastruby.io">
        <p id="ad_copy"> You need to upgrade your app to Rails 5.2. We can help with our productized consulting service. </p>
      </a>
    </div>
  {%- endif -%}
  <h2 class="category-name">Listing all tags</h2>
    {%- for post in site.posts -%}
      {%- for category in post.categories -%}
        {%- assign item = category -%}

        {%- unless tags contains item -%}
          {%- assign tags = tags | append: ';' | append: item -%}
        {%- endunless -%}
      {%- endfor -%}
    {%- endfor -%}

    {%- assign list = tags | split: ';' | sort -%}
    {%- for category in list -%}
        <h3 class="tag-name">
          <a href="{{ site.baseurl }}/tags/{{ category | replace: ' ','-' }}"
             title="Articles about {{ category | titleize | replace: '-',' ' }}">{{ category | titleize  | replace: '-',' ' }}</a>
        </h3>
    {%- endfor -%}
</div>

Fix broken image for fastruby.io ad
Fix broken image for fastruby.io ad
