Sha256: f1d0895a5d8cc1f49d7152ab18fa704c397103ca11389d1afdb335580bca8817

Contents?: true

Size: 1.28 KB

Versions: 3

Compression:

Stored size: 1.28 KB

Contents

{%- if include.stream -%}
  {%- assign target = site.streams | where: 'category_id', include.stream | first -%}
{%- elsif include.calendar -%}
  {%- assign target = site.calendars | where: 'category_id', include.calendar | first -%}
{%- elsif include.post -%}
  {%- assign target = site.posts | where: 'path', include.post | first -%}
{%- elsif include.page -%}
  {%- assign target = site.pages | where: 'path', include.page | first -%}
{%- endif -%}
{%- if include.class -%}
  {%- assign class_attr = 'class="' | append: include.class | append: '"' -%}
{%- else -%}
  {%- assign class_attr = '' -%}
{%- endif -%}
{%- if include.style -%}
  {%- assign style_attr = 'style="' | append: include.style | append: '"' -%}
{%- else -%}
  {%- assign style_attr = '' -%}
{%- endif -%}
{%- if include.sub -%}
  {%- assign hash = '#'' | append: include.sub -%}
{%- else -%}
  {%- assign hash = '' -%}
{%- endif -%}
{%- if include.md_ref -%}
  {{- target.url | relative_url -}}{{- hash }} "{{- target.title }} ({{- target.description -}})"
{%- else -%}
  <a href="{{- target.url | relative_url -}}{{- hash -}}" title="{{- target.description -}}"{{- class_attr -}}{{- style_attr -}}>{{- target.title -}}</a>
{%- endif -%}
{%- comment -%} съедаем финальный перенос строки {%- endcomment -%}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jekyll-theme-shikhalev-0.1.0.8 _includes/link.liquid
jekyll-theme-shikhalev-0.1.0.6 _includes/link.liquid
jekyll-theme-shikhalev-0.1.0.5 _includes/link.liquid