Show a sidebar only on non-content pages (such as Views) or page content type pages

I also wanted to not have it on the front page, so i did that too. Twig if statements are full-powered.

{# Sidebar first #}
{% if page.sidebar_first and not is_front and (node and node.bundle == 'page') %}
{# Set attributes for content. #}
  {% if not page.sidebar_first_attributes %}
  {%
    set page = page|merge({
      'sidebar_first_attributes': create_attribute().addClass([
        'sidebar-first',
        'column',
        'is-2',
      ]),
    })
  %}
  {% endif %}
  <aside{{page.sidebar_first_attributes|without('role')}} role="complimentary">
    {{ page.sidebar_first }}
  </aside>
{% endif %}
{% endblock sidebar_first %}