1{%- assign _author = site.data.authors[include.article.author] | default: site.author -%} 2 3{%- if include.html != false -%} 4 5 {%- include snippets/assign.html 6 target=site.data.variables.default.page.show_date 7 source0=layout.show_date source1=include.article.show_date -%} 8 {%- assign _show_date = __return -%} 9 {%- if _show_date and include.article.date -%} 10 {%- assign _show_date = true -%} 11 {%- else -%} 12 {%- assign _show_date = false -%} 13 {%- endif -%} 14 15 {%- include snippets/assign.html 16 target=site.data.variables.default.page.show_tags 17 source0=layout.show_tags source1=include.article.show_tags -%} 18 {%- assign _show_tags = __return -%} 19 {%- if _show_tags and include.article.tags[0] -%} 20 {%- assign _show_tags = true -%} 21 {%- else -%} 22 {%- assign _show_tags = false -%} 23 {%- endif -%} 24 25 {%- assign _show_author = include.article.author -%} 26 27 {%- include snippets/assign.html target=site.data.variables.default.page.pageview 28 source0=layout.pageview source1=page.pageview -%} 29 {%- assign _pageview = __return -%} 30 {%- if _pageview or include.show_pageview -%} 31 {%- assign _pageview = true -%} 32 {%- else -%} 33 {%- assign _pageview = false -%} 34 {%- endif -%} 35 36 {%- assign _paths_archive = site.paths.archive | default: site.data.variables.default.paths.archive -%} 37 38 {%- if _show_tags or _show_author or _show_date or _pageview -%} 39 <div class="article__info clearfix"> 40 {%- if _show_tags -%} 41 42 <ul class="left-col menu"> 43 {%- assign _tag_path = _paths_archive | append: '?tag=' -%} 44 {%- include snippets/prepend-baseurl.html path=_tag_path -%} 45 46 {%- for _tag in include.article.tags -%} 47 {%- assign _tag_path = __return -%} 48 {%- assign _tag_encode = _tag | strip | url_encode } -%} 49 <li> 50 <a class="button button--secondary button--pill button--sm" 51 href="{{ _tag_path | append: _tag_encode | replace: '//', '/' }}">{{ _tag }}</a> 52 </li> 53 {%- endfor -%} 54 </ul> 55 {%- endif -%} 56 57 {%- if _show_author or _show_date or _pageview -%} 58 <ul class="right-col menu"> 59 {%- if _show_author -%} 60 <li><i class="fas fa-user"></i> <span>{{ _author.name }}</span></li> 61 {%- endif -%} 62 63 {%- if _show_date -%} 64 <li> 65 {%- include snippets/get-locale-string.html key='ARTICLE_DATE_FORMAT' -%} 66 <i class="far fa-calendar-alt"></i> <span>{{ include.article.date | date: __return }}</span> 67 </li> 68 {%- endif -%} 69 70 {%- if _pageview -%} 71 {%- if site.pageview.provider -%} 72 {%- include snippets/get-locale-string.html key='VIEWS' -%} 73 {%- assign _locale_views = __return -%} 74 <li><i class="far fa-eye"></i> <span class="js-pageview" data-page-key="{{ include.article.key }}">0</span> {{ _locale_views }}</li> 75 {%- endif -%} 76 {%- endif -%} 77 </ul> 78 {%- endif -%} 79 80 </div> 81 {%- endif -%} 82{%- endif -%} 83 84 85{%- if include.semantic != false -%} 86 {%- if _author -%} 87 <meta itemprop="author" content="{{ _author.name }}"/> 88 {%- endif -%} 89 {%- if include.article.date -%} 90 <meta itemprop="datePublished" content="{{ include.article.date | date_to_xmlschema }}"> 91 {%- endif -%} 92 {%- if include.article.tags[0] -%} 93 {%- assign _keywords = include.article.tags | join: ',' %} 94 <meta itemprop="keywords" content="{{ _keywords }}"> 95 {%- endif -%} 96{%- endif -%} 97