this repo has no description
at master 2.4 kB view raw
1{% macro section_meta(section, author) %} 2 <div class="post-meta"> 3 {%- if section.extra["date"] -%} 4 <time class="post-date" datetime="{{ section.extra["date"] }}"> 5 {{ section.extra["date"] | date(format="%Y.%m.%d") }} 6 </time> 7 {%- endif -%} 8 </div> 9{% endmacro section_meta %} 10 11{% macro meta(page, author) %} 12 <div class="post-meta"> 13 <span class="post-date"> 14 {%- if page.date -%} 15 <time class="dt-published" datetime="{{ page.date }}">{{ page.date | date(format="%Y.%m.%d") }}</time> 16 {%- endif -%} 17 18 {%- if page.updated -%} 19 [Updated: <time class="dt-updated" datetime="{{ page.updated }}">{{ page.updated | date(format="%Y.%m.%d") }}</time>] 20 {%- endif -%} 21 </span> 22 :: 23 <time datetime="P{{ page.reading_time }}M">{{ page.reading_time }} min</time> 24 25 {{ posts::taxonomies(taxonomy=page.taxonomies, 26 disp_cat=config.extra.show_categories, 27 disp_tag=config.extra.show_tags) }} 28 </div> 29{% endmacro meta %} 30 31{% macro taxonomies(taxonomy, disp_cat, disp_tag) %} 32 {%- if taxonomy.categories -%} 33 {{ posts::categories(categories=taxonomy.categories) }} 34 {%- endif -%} 35 {%- if taxonomy.tags -%} 36 {{ posts::tags(tags=taxonomy.tags) }} 37 {%- endif -%} 38{% endmacro taxonomies %} 39 40{% macro categories(categories) %} 41 :: { 42 {%- for cat in categories -%} 43 {%- if loop.last -%} 44 <a class="p-category" href="{{ get_taxonomy_url(kind="categories", name=cat ) }}">{{ cat }}</a> 45 {%- else -%} 46 <a class="p-category" href="{{ get_taxonomy_url(kind="categories", name=cat ) }}">{{ cat }}</a>, 47 {%- endif -%} 48 {%- endfor -%}}{# <--- NOTE: OPEN CURLY BRACE #} 49{% endmacro categories %} 50 51{% macro tags(tags) %} 52 :: 53 {% for tag in tags -%} 54 #<a class="p-category" href="{{get_taxonomy_url(kind="tags", name=tag )}}">{{ tag }}</a> 55 {% endfor -%} 56{% endmacro tags %} 57 58{% macro thanks(who) %} 59 {%- if who is object -%} 60 {%- if who.url -%} 61 <a class="u-url p-name" href="{{ who.url }}">{{ who.name }}</a> 62 {%- else -%} 63 <span class="p-name">{{ who.name }}</span> 64 {%- endif -%} 65 {%- if who.why %} for {{ who.why }}{%- endif -%} 66 {%- else -%} 67 <span class="p-name">{{ who }}</span> 68 {%- endif -%} 69{% endmacro %}