2021-05-29 09:18:14 -04:00
parent 1b69d01a19
commit f345256921
6 changed files with 19 additions and 16 deletions
+2 -2
View File
@@ -1,2 +1,2 @@
<link rel="alternate" type="application/rss+xml" href="{{ "feed.xml" | absURL }}" title="{{ .Site.Title }} (RSS)">
<link rel="alternate" type="application/atom+xml" href="{{ "feed.atom" | absURL }}" title="{{ .Site.Title }} (Atom)">
<link rel="alternate" href="{{ "feed.xml" | absURL }}" type="application/rss+xml" title="{{ .Site.Title }} (RSS)">
<link rel="alternate" href="{{ "feed.atom" | absURL }}" type="application/atom+xml" title="{{ .Site.Title }} (Atom)">
+3 -8
View File
@@ -1,16 +1,11 @@
{{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "sass/main.scss" . | resources.ToCSS (dict "targetPath" "css/main.css") | resources.PostCSS (dict "config" "postcss.config.js") }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
{{/* 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 | resources.ExecuteAsTemplate $target . | resources.PostCSS (dict "config" "postcss.config.js") -}}
{{/* Already being minified to my taste by PostCSS above */}}
{{/* Page-specific styles set via front matter, piped through PostCSS and inlined (see functions/init) */}}
{{- with .Scratch.Get "pageCss" -}}
{{ printf "<!-- htmlmin:ignore -->" | safeHTML -}}
<style>
{{ $css.Content | safeCSS }}
{{ . | safeCSS }}
</style>
{{- printf "<!-- htmlmin:ignore -->" | safeHTML }}
{{ end -}}