--- title: Tags date: 2020-02-03 01:23:45 -0800 permalink: /tags/ # trailing slash makes it an `index.html` file inside the `/tags/` directory, rather than a `tags.html` file in the root # TODO: add tag pages for project- and page-specific tags, or merge project/page tags into site tags collection # NOTE: site.tags is a collection of documents for which tag.first is the tag itself --- {%-if site.plugins contains 'jekyll-archives'-%}{%-assign archives_available = true-%} {%-else-%}{%-assign archives_available = false-%}{%-endif-%} {%-assign sorted_tags = site.tags | sort-%} {%-assign published_projects = site.projects | where: 'published', true-%} {%-assign published_pages = site.pages | where: 'published', true-%} {%-assign project_tags = published_projects | map: 'tags' | join: '-----' | split: '-----' | uniq-%} {%-assign page_tags = published_pages | map: 'tags' | join: '-----' | split: '-----' | uniq-%} {%-assign merged_tags = project_tags | concat: page_tags | uniq | sort-%}

These are the tags used on {{-site.title-}}  (number of   posts{%-if published_projects != empty or published_pages != empty %} /   projects{%-if published_pages != empty %} /   pages{%-endif-%}{%-endif-%}).

Site-wide Tags

{% if project_tags != empty-%}

  Project-specific

{% if site.show.alt_archive_links-%} {%-else-%} {% for tag in project_tags-%} {%-if site.tags contains tag-%}{%-continue-%}{%-endif-%} {%-assign projects = published_projects | where_exp: 'project', "project.tags contains tag"-%}

{{-tag-}}

    {% for project in projects-%} {% include list_item.html title_template="Check out the ':item_title' project"-%} {%-endfor %}
{%-endfor %} {% endif-%} {% endif %} {% if page_tags != empty-%}

  Page-specific

{% if site.show.alt_archive_links-%} {%-else-%} {% for tag in page_tags-%} {%-if site.tags contains tag-%}{%-continue-%}{%-endif-%} {%-assign pages = published_pages | where_exp: 'pg', "pg.tags contains tag"-%}

{{-tag-}}

    {% for pg in pages-%}
  1. {{-pg.title-}}
  2. {%-endfor %}
{%-endfor %} {% endif-%} {% endif %}