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

stop hardcoding images/ directory in content frontmatter

This commit is contained in:
2020-04-16 09:34:58 -04:00
parent 9005c00112
commit 8537042ff1
28 changed files with 38 additions and 26 deletions

View File

@@ -8,7 +8,7 @@
{{/* Article image (with fallback to default image */}}
{{- with .Params.image }}
{{- $imagePath := (path.Join "content" $.File.Dir "images/" .) }}
{{- $imagePath := (path.Join "content" $.File.Dir .) }}
{{- $.Scratch.Set "socialImage_url" (replace $imagePath "content/" "") }}
{{- with (imageConfig $imagePath) }}