mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 04:35:31 -04:00
stop hardcoding images/ directory in content frontmatter
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<h1><a class="no-underline" href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
|
||||
|
||||
<video
|
||||
{{ with .Resources.GetMatch "images/*.png" }}poster="{{ .Permalink }}"{{ end }}
|
||||
{{ with .Resources.GetMatch "thumb.*" }}poster="{{ .Permalink }}"{{ end }}
|
||||
controls crossorigin playsinline preload="none">
|
||||
{{ with .Resources.GetMatch "*.webm" }}<source src="{{ .Permalink }}" type="video/webm">{{ end }}
|
||||
{{ with .Resources.GetMatch "*.mp4" }}<source src="{{ .Permalink }}" type="video/mp4">{{ end }}
|
||||
|
@@ -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) }}
|
||||
|
Reference in New Issue
Block a user