mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-12-03 04:18:57 -05:00
lots of random cleanup & organization
This commit is contained in:
19
layouts/partials/functions/prepare-css.html
Normal file
19
layouts/partials/functions/prepare-css.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{{/* Pull in CSS processed by Webpack */}}
|
||||
|
||||
{{- define "__head_css" -}}
|
||||
{{ with .Site.Data.manifest }}
|
||||
{{ with index . "main.css" }}
|
||||
<link rel="stylesheet" href="{{ .src | absURL }}">
|
||||
{{ end }}
|
||||
{{ 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.scss" -}}
|
||||
{{- $css := . | resources.FromString $target -}}
|
||||
<style>
|
||||
{{ $css.Content | safeCSS }}
|
||||
</style>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user