diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml
index 0b53d4e9..165a539e 100644
--- a/layouts/_default/rss.xml
+++ b/layouts/_default/rss.xml
@@ -53,9 +53,21 @@
{{ else if .Description }}
{{ printf "" (.Description | markdownify) | safeHTML }}
{{ end }}
- {{ with .Permalink }}
- {{ . }}
- {{ . }}
+ {{ $guid := "" }}
+ {{ $permalink := false }}
+ {{ if .Params.id }}
+ {{ $guid = .Params.id }}
+ {{ else if not .Date.IsZero }}
+ {{ $guid = printf "tag:%s,%s:%s" (urls.Parse site.BaseURL).Host (.Date.Format "2006-01-02") (.Date.Format "2006-01-02T15:04:05Z07:00") }}
+ {{ else }}
+ {{ $guid = .RelPermalink }}
+ {{ $permalink = false }}
+ {{ end }}
+ {{ $guid }}
+ {{ if and .Params.link (not (.Param "paige.feed.atom.link_to_page")) }}
+ {{ .Params.link | safeURL }}
+ {{ else }}
+ {{ .Permalink | safeURL }}
{{ end }}
{{ with .PublishDate }}
{{ .Format "Mon, 02 Jan 2006 15:04:05 -0700" }}