mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-12-03 03:48:55 -05:00
fix page CSS parsing on amp pages
https://search.google.com/search-console/amp/drilldown?resource_id=https%3A%2F%2Fjarv.is%2F&item_key=GhkIIhADIhBzdHlsZSBhbXAtY3VzdG9tKKVO&hl=en&sharing_key=ozvLdt6NrwXwjyC3ZJCWPA
This commit is contained in:
@@ -37,3 +37,11 @@
|
||||
{{- $.Scratch.Set "logoImage" . -}}
|
||||
{{- 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 | resources.ExecuteAsTemplate $target . | resources.ToCSS (dict "targetPath" $target) | resources.PostCSS (dict "config" "postcss.config.js") -}}
|
||||
{{- $.Scratch.Set "pageCss" $css.Content -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user