From b727987180adce62aee99901e94a3e4e3ffebfc2 Mon Sep 17 00:00:00 2001 From: "chris062689@gmail.com" Date: Mon, 8 Oct 2018 22:21:34 -0400 Subject: [PATCH] Added RSS and Sitemap. --- layouts/rss.xml | 21 +++++++++++++++++++++ layouts/sitemap.xml | 26 ++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 layouts/rss.xml create mode 100644 layouts/sitemap.xml diff --git a/layouts/rss.xml b/layouts/rss.xml new file mode 100644 index 0000000..249f47a --- /dev/null +++ b/layouts/rss.xml @@ -0,0 +1,21 @@ + + + {{ .Title }} on {{ .Site.Title }} + {{ .Permalink }} + en-US + Citra + Copyright (c) 2017, Citra; all rights reserved. + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 MST" }} + {{ range where .Data.Pages "Section" "entry" }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 MST" }} + {{ .Params.Author }} + {{ .Permalink }} + {{ .Summary | html }} + + {{ end }} + + + diff --git a/layouts/sitemap.xml b/layouts/sitemap.xml new file mode 100644 index 0000000..ecde457 --- /dev/null +++ b/layouts/sitemap.xml @@ -0,0 +1,26 @@ + + {{ range .Data.Pages }} + {{ if (eq .IsPage true) }} + {{ $rating := index .Site.Data.compatibility ( string .Params.compatibility | default "0" ) }} + + + {{ .Permalink }} + + {{ if (eq .Section "entry") }} + + {{ .Site.BaseURL }}/images/banners/{{ .Params.Banner | default (print .File.BaseFileName ".png") }} + + {{ else if (eq .Section "game") }} + + {{ .Site.BaseURL }}/images/game/icons/{{ .File.BaseFileName }}.png + + {{ end }} + + {{ if not .Lastmod.IsZero }}{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }} + {{ with .Sitemap.ChangeFreq }}{{ . }}{{ end }} + {{ if ge .Sitemap.Priority 0.0 }}{{ .Sitemap.Priority }}{{ end }} + + {{ end }} + {{ end }} + +