summaryrefslogtreecommitdiff
path: root/layouts
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 /layouts
parentbe4204047f3672f76151328bf5e3e269f2fc76da (diff)
feat: fix rss
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/blog/cross-site-post.html18
-rw-r--r--layouts/partials/external_link.html17
2 files changed, 19 insertions, 16 deletions
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 }}
+
+