1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 23:35:31 -04:00

set max width of pages in Hugo config.toml, retrieve value from SCSS

https://gohugo.io/hugo-pipes/resource-from-template/
This commit is contained in:
2020-03-27 20:58:52 -04:00
parent 146b1047e1
commit bc3e1f9309
12 changed files with 19 additions and 13 deletions

View File

@@ -3,7 +3,7 @@
{{ $original := .Page.Resources.GetMatch (.Get "src") }}
{{ .Scratch.Set "image" $original }}
{{ $setWidth := 910 }}
{{ $setWidth := .Site.Params.pageMaxWidth }}
{{ if .Get "width" }}
{{ $setWidth = (int (.Get "width")) }}