Sha256: 8b1110eefcb99290582a3b48181bd9bf4089a7d3c893c6b1fb39201bd88fc53f
Contents?: true
Size: 773 Bytes
Versions: 29
Compression:
Stored size: 773 Bytes
Contents
{%- comment -%} Generate image final URL based on `site.img_cdn`, `page.img_path` Arguments: src - basic image path, required img_path - relative path of image, optional Return: image URL {%- endcomment -%} {% assign url = include.src %} {%- if url -%} {% unless url contains ':' %} {%- comment -%} CND URL {%- endcomment -%} {% assign prefix = site.img_cdn | default: '' | relative_url %} {%- comment -%} Add page image path prefix {%- endcomment -%} {% assign url = include.img_path | default: '' | append: '/' | append: url %} {% assign url = prefix | append: '/' | append: url | replace: '///', '/' | replace: '//', '/' | replace: ':', ':/' %} {% endunless %} {%- endif -%} {{- url -}}
Version data entries
29 entries across 29 versions & 2 rubygems