diff --git a/README.md b/README.md index b599986..a10a72d 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ For more explanation about some features, scroll down to **Features** * **(+)** New list of all taxonomies and tags below the post in single view * **(+)** New array front matter notaxonomy * **(+)** Author/Writer display in post with extra features +* **(+)** New bool front matter nofeed * Multilingual support for month names * Syntax highlighting * Custom CSS @@ -195,6 +196,16 @@ website. All content that has no author set, will not use this feature obviously. +### Front matter "nofeed" for RSS + +If you have pages, posts or other content that should not show up in the RSS +feed of your website. You can set the new front matter `nofeed` for this +content. It's a boolean, you could use either `true` or `false`. + +If you want to modify the `index.xml` layout. Copy the Vitae layout from +`hugo-vitae/layouts/index.xml` to your Hugo site root directory into the +folder `layouts/` and change it the way you want. + ## Credits * [hugo-ink](https://github.com/knadh/hugo-ink) from which Vitae was forked diff --git a/layouts/index.xml b/layouts/index.xml new file mode 100644 index 0000000..75794c4 --- /dev/null +++ b/layouts/index.xml @@ -0,0 +1,29 @@ +{{ printf "" | safeHTML }} + + + {{ 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 -- 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 .Site.RegularPages }} + {{- if ne .Params.nofeed true -}} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ .Summary | html }} + + {{ end -}} + {{ end }} + +