From 18b4f9d678aa7548581a09b0ab1698817c477881 Mon Sep 17 00:00:00 2001
From: Greg Gauthier
Date: Wed, 25 Jan 2023 14:13:21 +0000
Subject: [PATCH] first crack at setting up RSS
---
config.toml | 15 +++++++
layouts/_default/rss.xml | 86 ++++++++++++++++++++++++++++++++++++++++
static/css/index.css | 2 +-
3 files changed, 102 insertions(+), 1 deletion(-)
create mode 100644 layouts/_default/rss.xml
diff --git a/config.toml b/config.toml
index dda4543..2cc13a1 100644
--- a/config.toml
+++ b/config.toml
@@ -2,10 +2,25 @@ baseURL = 'https://ataricode.com/'
languageCode = 'en-us'
title = 'Atari Code'
+[author]
+ name = "Greg Gauthier"
+ email = "gmgauthier@protonmail.com"
+
+
+enableInlineShortcodes = true
+enableGitInfo = true
+canonifyurls = true
+
+[markup]
+ [markup.goldmark.renderer]
+ unsafe= true
[permalinks]
blog = "/:filename/"
+[taxonomies]
+ tag = "tags"
+
[params]
logo = "img/atari-symbol-only-no-background.png"
titleLink = "https://ataricode.com/"
diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
new file mode 100644
index 0000000..094d706
--- /dev/null
+++ b/layouts/_default/rss.xml
@@ -0,0 +1,86 @@
+{{- $pctx := . -}}
+{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
+{{- $pages := slice -}}
+{{- if or $.IsHome $.IsSection -}}
+{{- $pages = $pctx.RegularPages -}}
+{{- else -}}
+{{- $pages = $pctx.Pages -}}
+{{- end -}}
+{{- $limit := .Site.Config.Services.RSS.Limit -}}
+{{- if ge $limit 1 -}}
+{{- $pages = $pages | first $limit -}}
+{{- end -}}
+{{- printf "" | safeHTML }}
+
+
+ {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}
+ {{ .Permalink }}
+
+ {{ .Permalink }}img/atari-symbol-only-no-background.png
+ Atari Code
+ {{ .Permalink }}
+ 32
+ 32
+
+ {{ .Permalink }}img/atari-symbol-only-no-background.png
+ Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}
+ Hugo -- gohugo.io{{ with .Site.LanguageCode }}
+ {{.}}{{end}}{{ with .Site.Author.email }}
+ {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }}
+ {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }}
+ {{.}}{{end}}{{ if not .Date.IsZero }}
+ {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }}
+ {{- with .OutputFormats.Get "RSS" -}}
+ {{ printf "" .Permalink .MediaType | safeHTML }}
+ {{- end -}}
+ {{ range $pages }}
+ {{ if or (eq .Title "Links") (eq .Title "Videos") }}
+ {{else}}
+ -
+ {{ .Title }}
+ {{ .Permalink }}
+ {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}
+ {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}
+
+
+ {{ if isset .Params "enclosure" }}
+ {{ $cdnUrl := .Site.Params.podcastCdnUrl }}
+ Podcast: {{.Params.series }}
+
+
+ {{`
{{end}}
+ {{ .Summary | safeHTML }}
+ ]]>
+
+
+ {{`
+ {{ .Content | safeHTML }}
+ ]]>
+
+ {{ else }}
+ {{ if isset .Params "topic" }}Reading: {{ .Params.topic }}
+ {{else}}
+ Blog: {{.Params.topics }}
+ {{ end }}
+ {{ if isset .Params "image" }}
+ {{ $cdnUrl := .Site.Params.blogCdnUrl }}
+ {{ with .Params.image }}{{ end }}
+ {{ else }}
+
+ {{ end }}
+
+ {{`{{ end }}
+ {{ .Summary | safeHTML }}
+ ]]>
+
+ {{ end }}
+
+ {{ end }}
+ {{ end }}
+
+
\ No newline at end of file
diff --git a/static/css/index.css b/static/css/index.css
index 34d63bf..764653d 100644
--- a/static/css/index.css
+++ b/static/css/index.css
@@ -114,7 +114,7 @@ body {
p {
font-family: 'Atari Classic Extrasmooth', serif;
line-height: 1.3;
- font-size: 0.595em;
+ font-size: 0.575em;
color: #f2f2f2;
}