mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-28 16:10:30 -04:00
14 lines
398 B
HTML
14 lines
398 B
HTML
{{/* Returns the URL and hash of an asset processed by Webpack */}}
|
|
{{/* Usage: pass in (dict "context" . "src" "images/tiny-selfie.jpg"), returns .src = "/assets/images/tiny-selfie.jpg", .integrity = "sha384-asdfjklsemicolon" */}}
|
|
|
|
{{ $src := .src }}
|
|
{{ $data := "" }}
|
|
|
|
{{ with .context.Site.Data.manifest }}
|
|
{{ with index . $src }}
|
|
{{ $data = . }}
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
{{ return $data }}
|