diff --git a/assets/rss-image.png b/assets/rss-image.png new file mode 100644 index 0000000..6882384 Binary files /dev/null and b/assets/rss-image.png differ diff --git a/config.yaml b/config.yaml index ad93b4f..54870e8 100644 --- a/config.yaml +++ b/config.yaml @@ -5,6 +5,7 @@ disableHugoGeneratorInject: true enableGitInfo: true enableRobotsTXT: true languageCode: 'en-us' +summarylength: 15 minify: tdewolff: @@ -24,6 +25,7 @@ params: author: name: 'redstrate' + email: 'josh@redstrate.com' permalinks: blog: 'blog/:year/:month/:title/' diff --git a/themes/red/layouts/_default/rss.xml b/themes/red/layouts/_default/rss.xml index 3dc635c..d75b26b 100644 --- a/themes/red/layouts/_default/rss.xml +++ b/themes/red/layouts/_default/rss.xml @@ -16,30 +16,54 @@ xmlns:atom="http://www.w3.org/2005/Atom" xml:base="{{ .Site.BaseURL }}"> - {{ .Site.Author.name }}'s blog + {{ .Site.Author.name }}'s Blog {{ .Permalink }} - My blog where I post about the things I like. - {{ 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 not (.Param "excludefeed") }} - - {{ .Title }} - {{ .Permalink }} - {{ with $.Site.Author.name }}{{ . }}{{ end }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} - {{ .Permalink }} - {{ " - {{ " - + My blog where I post about the things I like and work on! + + {{ with .Site.LanguageCode }}{{.}}{{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 -}} + + https://www.rssboard.org/rss-specification + + {{ with resources.Get "rss-image.png" }} + + {{ .Permalink }} + {{ $.Site.Author.name }}'s Art + {{ $.Permalink }} + 100 + 100 + + {{ end }} + + {{ range $pages }} + {{ if not (.Param "excludefeed") }} + + {{ .Title }} + + {{ .Permalink }} + + {{ with $.Site.Author.name }} + {{ . }} + {{ end }} + + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + + {{ .Permalink }} + {{ " + {{ " + + {{ end }} {{ end }} diff --git a/themes/red/layouts/art/rss.xml b/themes/red/layouts/art/rss.xml index 13958c2..2928e16 100644 --- a/themes/red/layouts/art/rss.xml +++ b/themes/red/layouts/art/rss.xml @@ -16,30 +16,76 @@ xmlns:atom="http://www.w3.org/2005/Atom" xml:base="{{ .Site.BaseURL }}"> - {{ .Site.Author.name }}'s art + {{ .Site.Author.name }}'s Art {{ .Permalink }} Feed of the art that I make! - {{ 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 not (.Param "excludefeed") }} - - {{ .Title }} - {{ .Permalink }}' - {{ with $.Site.Author.name }}{{ . }}{{ end }} - {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} - {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} - {{ .Permalink }} - {{ " - {{ " - + {{ with .Site.LanguageCode }} + {{.}} + {{end}} + + {{ with .Site.Copyright }} + {{.}} + {{end}} + + {{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ end }} + + https://www.rssboard.org/rss-specification + + {{ with resources.Get "rss-image.png" }} + + {{ .Permalink }} + {{ $.Site.Author.name }}'s Art + {{ $.Permalink }} + 100 + 100 + + {{ end }} + + {{- with .OutputFormats.Get "RSS" -}} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{- end -}} + + {{ range $pages }} + {{ if not (.Param "excludefeed") }} + + {{ with .Title }} + {{ . }} + {{ else }} + Untitled Artwork + {{ end }} + + {{ .Permalink }} + + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + + {{ .Permalink }} + + {{ with .Summary }} + {{ " + {{ else }} + This artwork has no description. + {{ end }} + + {{ with $.Site.Author.name }} + {{ . }} + {{ end }} + + {{ " + {{ end }} + + {{ with .Content }} +

{{ . | safeHTML }}

+ {{ else }} +

This artwork has no additional commentary.

+ {{ end }}]]> +
+
+ {{ end }} {{ end }}
diff --git a/themes/red/layouts/partials/rss.html b/themes/red/layouts/partials/rss.html index da021ae..7ffef00 100644 --- a/themes/red/layouts/partials/rss.html +++ b/themes/red/layouts/partials/rss.html @@ -1,4 +1,3 @@ - {{ $html := .Content | safeHTML }} {{ $hrefs := findRE "href=\"([^\"]*)\"" $html }} @@ -35,4 +34,4 @@ {{ $html = replace $html $set $newSrcset }} {{ end }} -{{ return $html }} \ No newline at end of file +{{ return $html }}