Skip to content

Instantly share code, notes, and snippets.

View tech4him1's full-sized avatar

Caleb tech4him1

View GitHub Profile
@fer-ri
fer-ri / markdown.md
Created March 22, 2015 13:52
Dummy Data Markdown
layout title
post
Markdown ipsum test

A First Level Header

A Second Level Header

A Third Level Header

A Fourth Level Header

A Fifth Level Header
@randallmlough
randallmlough / hugo-img-partial.html
Last active June 21, 2021 01:36
Complete hugo img partial using page resources
{{ $image := .Params.image}}
{{ $media := (.Site.GetPage "page" "media").Resources }}
{{ $original := index ($media.Match (printf "%s" $image)) 0 }}
{{ $width := $original.Width}}
{{ $intWidth := int $width }}
{{ $sizes := .Params.sizes}}
{{ $options := .Params.options}}
{{ if le (len $sizes) 1 }}
{{ $oneSize := index $sizes 0}}