From e1d2822586781463c394b4b190d6bec6f49c9d88 Mon Sep 17 00:00:00 2001 From: tastytea Date: Wed, 20 Nov 2019 23:52:38 +0100 Subject: [PATCH] Add EditorConfig. --- .editorconfig | 19 +++++++++++ layouts/_default/rss.xml | 68 ++++++++++++++++++++-------------------- 2 files changed, 53 insertions(+), 34 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8e61d2d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,19 @@ +# Configuration file for EditorConfig. +# More information is available under . + +root = true + +[*] +indent_style = space +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.{css,toml}] +indent_size = 4 +tab_width = 4 + +[*.{html,xml}] +indent_size = 2 +tab_width = 2 diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index a651b6e..eb7014d 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -1,36 +1,36 @@ - - {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} - {{ .Permalink }} - Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} - Hugo {{ .Hugo.Version }} -- gohugo.io - {{- with .Site.LanguageCode }} - {{ . }} - {{- end }} - {{- with .Site.Author.email }} - {{ . }}{{ with $.Site.Author.name }} ({{ . }}){{ end }} - {{ . }}{{ 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 .Data.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 }} - + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo {{ .Hugo.Version }} -- gohugo.io + {{- with .Site.LanguageCode }} + {{ . }} + {{- end }} + {{- with .Site.Author.email }} + {{ . }}{{ with $.Site.Author.name }} ({{ . }}){{ end }} + {{ . }}{{ 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 .Data.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 }} +