initial
This commit is contained in:
8
persimmon/layouts/shortcodes/img.html
Normal file
8
persimmon/layouts/shortcodes/img.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ $imagename := (.Get 0) }}
|
||||
{{ $options := .Get 1 }}
|
||||
{{ with .Site.GetPage "section" "media" }}
|
||||
{{ $original := .Resources.GetByPrefix $imagename }}
|
||||
{{ with ($original.Resize $options) }}
|
||||
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user