Pass an additional parameter to base/head/css.html

Pass the path of a stylesheet resource to this template so it can be used to
generate other CSS stylesheets.
This commit is contained in:
Eryn Wells 2024-07-23 08:46:52 -07:00
parent 8b834f8eab
commit 64c1704a6b
2 changed files with 2 additions and 2 deletions

View file

@ -1,5 +1,5 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
{{ partialCached "base/head/css.html" . }}
{{ partialCached "base/head/css.html" (dict "page" . "cssResource" "base/css.html") }}
{{ partialCached "base/head/js.html" . }}

View file

@ -1,4 +1,4 @@
{{- with (partial "base/css.html" .) }}
{{- with (partial .cssResource .page) }}
{{- if eq hugo.Environment "development" }}
<link rel="stylesheet" href="{{ .RelPermalink }}">
{{- else }}