Files
jarv.is/layouts/partials/functions/prepare-css.html
T

18 lines
603 B
HTML

{{/* Pull in CSS processed by Webpack */}}
{{- define "__head_css" -}}
{{ with partial "functions/webpack" (dict "context" . "src" "main.css") }}
<link rel="stylesheet" href="{{ .src }}">
{{ end }}
{{/* Page-specific styles set via front matter, piped through PostCSS and inlined */}}
{{- with .Params.css -}}
{{/* NOTE: This file doesn't end up getting published (which is good) */}}
{{- $target := path.Join $.File.Dir "css/inline.css" -}}
{{- $css := . | resources.FromString $target -}}
<style>
{{ $css.Content | safeCSS }}
</style>
{{- end -}}
{{- end -}}