Sha256: 59f902daec37b14238a1af494305263ddbb082b85d761b96cc3ae78ee8fbcbfd
Contents?: true
Size: 1.9 KB
Versions: 5
Compression:
Stored size: 1.9 KB
Contents
{% comment %} Usage: {% assign tag_attr = page.attributes | link_type: "tags" %} {% include tags.html tags_attrs=tag_attr tags_fms=page.tags %} Parameters: * tags_attrs (array) - array of attributes that are hashes with keys 'type' and 'urls' (which correspond to `jekyll-wikilinks` attributes and attributed metadata) * tags_fms (array) - array of strings that are tag names (which correspond to entry filenames) Note: To be used with germ-type documents. (e.g. markdown documents that use tags metadata to map to entries) {% endcomment %} <!-- 'tags' attribute --> {% for tag_attr in tags_attrs %} {% for url in tag_attr.urls %} {% assign entry = site.entries | where: "url", url | first %} <button class="tag-pill {% if entry %}{% else %}disabled{% endif %}"> {% if entry %} {% include btn_state.html states=entry.status %} <a class="sem-tag" href="{{ entry.url | relative_url }}">{{ entry.title }}</a> {% else %} <span class="text--small">{{ site.data.emoji.missing }} {{ sem_tag }}</span> {% endif %} </button> {% endfor %} {% endfor %} <!-- 'tags' frontmatter --> {% for sem_tag in tags_fms %} <!-- prefix with '/' to prevent matching subhierarchies --> {% assign sem_tag_path = "/" | append: sem_tag | append: ".md" %} {% assign entry = site.entries | find_exp: "item", "item.path contains sem_tag_path" %} <button class="tag-pill {% if entry %}{% else %}disabled{% endif %}"> {% if entry %} {% include btn_state.html states=entry.status %} <a class="sem-tag" href="{{ entry.url | relative_url }}">{{ entry.title }}</a> {% else %} <span class="text--small">{{ site.data.emoji.missing }} {{ sem_tag }}</span> {% endif %} </button> {% endfor %}
Version data entries
5 entries across 5 versions & 3 rubygems