diff --git a/config.toml b/config.toml index c5fbdda..15e30eb 100644 --- a/config.toml +++ b/config.toml @@ -3,6 +3,10 @@ languageCode = 'en-us' title = '~redstrate' theme = 'red' +copyright = 'This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0.' +[author] + name = 'redstrate' + [permalinks] blog = '/:year/:month/:title/' diff --git a/themes/red/layouts/_default/rss.xml b/themes/red/layouts/_default/rss.xml new file mode 100644 index 0000000..74c7afc --- /dev/null +++ b/themes/red/layouts/_default/rss.xml @@ -0,0 +1,38 @@ +{{- $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 }} + + + {{ .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 }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ .Content | html }} + + {{ end }} + + \ No newline at end of file