1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-12-03 04:18:57 -05:00

clean up a bunch of layouts, especially social-images function

also made even more config.toml parameters optional, will help when finally releasing theme
This commit is contained in:
2020-06-25 10:35:59 -04:00
parent 0a48ce296f
commit f3198e0235
31 changed files with 167 additions and 162 deletions

View File

@@ -3,7 +3,7 @@
{{ $original := .Page.Resources.GetMatch (.Get "src") }}
{{ .Scratch.Set "image" $original }}
{{ $setWidth := .Site.Params.pageMaxWidth }}
{{ $setWidth := .Site.Params.maxWidth }}
{{ if .Get "width" }}
{{ $setWidth = (int (.Get "width")) }}
@@ -22,4 +22,4 @@
{{ $displayWidth := $setWidth }}
{{ $displayHeight := (math.Ceil (mul $origRatio $setWidth)) }}
{{ return (dict "Permalink" $image.Permalink "Width" $displayWidth "Height" $displayHeight) }}
{{ return (dict "Permalink" $image.Permalink "Width" $displayWidth "Height" $displayHeight "MediaType" $image.MediaType) }}