Add paige.color_scheme config

This commit is contained in:
Will Faught
2024-04-06 23:47:58 -07:00
parent caac4048b5
commit c643ab3ffb
6 changed files with 21 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
{{ $params := . }}
{{ $context := $params.context }}
{{ $crossorigin := $params.crossorigin | default "anonymous" }}
{{ $href := $params.href }}
{{ $includepaths := $params.includepaths }}
@@ -20,7 +21,6 @@
{{ $resource := . }}
{{ if $template }}
{{ $context := dict "color" (page.Param "paige.color" | default "#0d6efd") }}
{{ $split := path.Split $href }}
{{ $join := path.Join $split.Dir (print (printf "%#v" $context | sha1) "-" $split.File) }}
{{ $resource = resources.ExecuteAsTemplate $join $context . }}