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:
@@ -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) }}
|
||||
|
||||
Reference in New Issue
Block a user