<feed xmlns="http://www.w3.org/2005/Atom">
  <updated>{{.ModifiedAt}}</updated>
  <generator>https://{{.Host}}</generator>
{{if not (eq "" .Metadata.Npub)}}
  <title>Nostr notes by {{.Metadata.Name}}</title>
  <author>
    <name>{{.Metadata.Name}}</name>
  </author>
  <link rel="self" type="application/atom+xml" href="https://{{.Host}}/{{.Metadata.Npub}}.rss" />
  <link href="https://{{.Host}}/{{.Metadata.Npub}}" />
  <id>https://{{.Host}}/{{.Metadata.Npub}}</id>
  <icon>{{.Metadata.Picture}}</icon>
  <logo>{{.Metadata.Picture}}</logo>
{{end}}
{{if not (eq "" .RelayHostname)}}
  <title>Nostr notes on {{.RelayHostname}}</title>
  <link href="https://{{.Host}}/r/{{.RelayHostname}}" />
  <link rel="self" type="application/atom+xml" href="https://{{.Host}}/r/{{.RelayHostname}}.rss" />
  <id>https://{{.Host}}/r/{{.RelayHostname}}</id>
  <icon>{{.Info.Icon}}</icon>
  <logo>{{.Info.Icon}}</logo>
{{end}}

{{range $i, $ee := .LastNotes}}
  <entry>
    <id>https://{{$.Host}}/{{$ee.Nevent}}</id>
    {{if not (eq "" $ee.RssTitle)}}
      <title type="html">{{$ee.RssTitle}}</title>
    {{else}}
      <title>Nostr event {{$ee.Nevent}}</title>
    {{end}}
    <link rel="alternate" href="https://{{$.Host}}/{{$ee.Nevent}}" />
    <content type="html">
      {{$ee.RssContent}}
    </content>
    <updated>{{$ee.ModifiedAtStr}}</updated>
  </entry>
{{end}}
</feed>