summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormms <michal@sapka.me>2024-09-23 23:00:13 +0200
committermms <michal@sapka.me>2024-09-23 23:00:13 +0200
commit0879852b669b45eab00d570c22e764de0a71b106 (patch)
tree960c5a4765c921e2d7e8da09b18e2148196e1853
parentbe4204047f3672f76151328bf5e3e269f2fc76da (diff)
feat: fix rss
-rw-r--r--content-org/blog.org1
-rw-r--r--content/blog/2024/internet-and-press.md1
-rw-r--r--layouts/partials/blog/cross-site-post.html18
-rw-r--r--layouts/partials/external_link.html17
-rw-r--r--themes/sapka-2024/layouts/_default/rss.xml11
5 files changed, 29 insertions, 19 deletions
diff --git a/content-org/blog.org b/content-org/blog.org
index 166c834..d0e78fd 100644
--- a/content-org/blog.org
+++ b/content-org/blog.org
@@ -20,6 +20,7 @@ CLOSED: [2024-09-23 Mon 22:45]
:PROPERTIES:
:EXPORT_FILE_NAME: internet-and-press
:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :abstract Grumpy mc grumps grumping
+:EXPORT_HUGO_CUSTOM_FRONT_MATTER+: :listening Milt Jackson & John Coltrane - Bags and Trane
:END:
As a kid, I loved reading computer related press.
diff --git a/content/blog/2024/internet-and-press.md b/content/blog/2024/internet-and-press.md
index 9f38f79..2cb4637 100644
--- a/content/blog/2024/internet-and-press.md
+++ b/content/blog/2024/internet-and-press.md
@@ -8,6 +8,7 @@ weight = 2001
image_dir = "blog/images"
image_max_width = 600
abstract = "Grumpy mc grumps grumping"
+listening = "Milt Jackson & John Coltrane - Bags and Trane"
+++
As a kid, I loved reading computer related press.
diff --git a/layouts/partials/blog/cross-site-post.html b/layouts/partials/blog/cross-site-post.html
index b438467..7684410 100644
--- a/layouts/partials/blog/cross-site-post.html
+++ b/layouts/partials/blog/cross-site-post.html
@@ -1,16 +1,3 @@
-{{ $section := "some other site" }}
-
-{{ if eq .Section "cool-emacs" }}
- {{ $section = "Cool Emacs" }}
-{{ else if eq .Section "brain-rot" }}
- {{ $section = "Brain Rots" }}
-{{ else if eq .Section "unix-history" }}
- {{ $section = "Unix History" }}
-{{ else if eq .Section "star-trek" }}
- {{ $section = "Star Trek" }}
-{{ else if eq .Section "bsd" }}
- {{ $section = "Guide to BSD" }}
-{{ end }}
<article class="link">
{{- $img := resources.Get "blog/assets/arrow.gif" }}
@@ -33,8 +20,7 @@
<time datetime="{{.PublishDate.Format "2006-01-02" }}">
{{ .PublishDate.Format "January 2, 2006" }}
</time><br>
- I published
- <a href="{{ .Permalink }}">"{{ .Title }}"</a>
- on {{ $section }}
+
+ {{ partial "external_link" . }}
</div>
</article>
diff --git a/layouts/partials/external_link.html b/layouts/partials/external_link.html
new file mode 100644
index 0000000..5b3277f
--- /dev/null
+++ b/layouts/partials/external_link.html
@@ -0,0 +1,17 @@
+{{ $section := "some other site" }}
+
+{{ if eq .Section "cool-emacs" }}
+ {{ $section = "Cool Emacs" }}
+{{ else if eq .Section "brain-rot" }}
+ {{ $section = "Brain Rots" }}
+{{ else if eq .Section "unix-history" }}
+ {{ $section = "Unix History" }}
+{{ else if eq .Section "star-trek" }}
+ {{ $section = "Star Trek" }}
+{{ else if eq .Section "bsd" }}
+ {{ $section = "Guide to BSD" }}
+{{ end }}
+
+I published <a href="{{ .Permalink }}">"{{ .Title }}"</a> on {{ $section }}
+
+
diff --git a/themes/sapka-2024/layouts/_default/rss.xml b/themes/sapka-2024/layouts/_default/rss.xml
index 563c93c..fa34bd5 100644
--- a/themes/sapka-2024/layouts/_default/rss.xml
+++ b/themes/sapka-2024/layouts/_default/rss.xml
@@ -67,9 +67,14 @@
{{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
<guid>{{ crypto.MD5 .Date }}</guid>
<description>
- {{ if in .Page.Params.Categories "blog" }}
- {{ safeHTML "<![CDATA[" }}{{ replace .Content "\n\n" "\n" | safeHTML }}<hr><p style="font-style:italic">Reply via <a href="https://michal.sapka.me/me/contact/">email</a></p>]]></description>
- {{ end }}
+ {{ if in .Page.Params.Categories "blog" }}
+ {{ safeHTML "<![CDATA[" }}{{ replace .Content "\n\n" "\n" | safeHTML }}
+ <hr><p style="font-style:italic">Reply via <a href="https://michal.sapka.me/me/contact/">email</a></p>]]>
+ {{ else }}
+ {{ safeHTML "<![CDATA[" }}{{ partial "external_link" . }}
+ <hr><p style="font-style:italic">Reply via <a href="https://michal.sapka.me/me/contact/">email</a></p>]]>
+ {{ end }}
+ </description>
</item>
{{- end }}
</channel>