diff --git a/assets/feed_style.xsl b/assets/feed_style.xsl new file mode 100644 index 0000000..3ed58f5 --- /dev/null +++ b/assets/feed_style.xsl @@ -0,0 +1,84 @@ + + + + + + + <xsl:value-of select="/rss/channel/title"/> RSS Feed + + + + {{ $style := resources.Get "/scss/style.scss" | resources.ExecuteAsTemplate "/scss/style.scss" . | resources.ToCSS (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") | resources.Fingerprint "sha512" }} + + + + +
+

+ + +

+
+

This is a web feed, also known as an RSS feed. Subscribe by copying the URL into your RSS reader.

+
+
+
+ +
+ +
+
+
+
+

📄 Recent Posts

+ +
+

+ +
+
+
+
+ + +
+
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 5d2b506..3b2bc96 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,6 +1,7 @@ {{- partial "head.html" . -}} + {{- partial "build_assets.html" . -}}
{{- partial "header.html" . -}} diff --git a/layouts/index.xml b/layouts/index.xml index 5f52ecc..155c39c 100644 --- a/layouts/index.xml +++ b/layouts/index.xml @@ -11,6 +11,7 @@ {{- $pages = $pages | first $limit -}} {{- end -}} {{- printf "" | safeHTML }} +{{- printf "" | safeHTML -}} {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} diff --git a/layouts/partials/build_assets.html b/layouts/partials/build_assets.html new file mode 100644 index 0000000..216434e --- /dev/null +++ b/layouts/partials/build_assets.html @@ -0,0 +1,10 @@ +{{/* + This partial builds non-standard assets (like xsl files) with the template + engine. It is necessary to do it this way to reduce user friction and + ensure that the file is there. +*/}} +{{ if .IsHome }} + {{ $feed_style_xsl_template := resources.Get "feed_style.xsl" }} + {{ $feed_style_xsl := $feed_style_xsl_template | resources.ExecuteAsTemplate "feed_style.xsl" . }} + {{ $noop := $feed_style_xsl.Permalink }} +{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index dea271e..ba5b281 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -29,7 +29,7 @@ {{ end }} {{ $style := resources.Get "/scss/style.scss" | resources.ExecuteAsTemplate "/scss/style.scss" . | resources.ToCSS (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") | resources.Fingerprint "sha512" }} - + {{- partial "inject/head.html" . -}} {{- partial "head_meta_seo.html" . -}} {{- partial "head_meta_opengraph.html" . -}}