Browse Source

Fix unclosed tags in Atom template

master
Adnan Maolood 7 months ago
parent
commit
d91de5881c
  1. 4
      templates.go
  2. 4
      templates/atom.xml

4
templates.go

@ -102,14 +102,14 @@ const atom_xml = `<?xml version="1.0" encoding="utf-8"?>
<id>{{ index site.URLs 0 }}{{ .Path }}</id>
<title>{{ .Title }}</title>
<updated>{{ .Updated.Format "2006-01-02T15:04:05Z07:00" }}</updated>
<link href="{{ index site.URLs 0 }}{{ .Path }}" rel="alternate">
<link href="{{ index site.URLs 0 }}{{ .Path }}" rel="alternate"/>
{{ range .Entries }}<entry>
<id>{{ index site.URLs 0 }}{{ .Path }}</id>
<title>{{ .Title }}</title>
<updated>{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}</updated>
{{- $path := .Path }}
{{- range site.URLs }}
<link href="{{ . }}{{ $path }}" rel="alternate">
<link href="{{ . }}{{ $path }}" rel="alternate"/>
{{- end }}
</entry>
{{ end -}}

4
templates/atom.xml

@ -3,14 +3,14 @@
<id>{{ index site.URLs 0 }}{{ .Path }}</id>
<title>{{ .Title }}</title>
<updated>{{ .Updated.Format "2006-01-02T15:04:05Z07:00" }}</updated>
<link href="{{ index site.URLs 0 }}{{ .Path }}" rel="alternate">
<link href="{{ index site.URLs 0 }}{{ .Path }}" rel="alternate"/>
{{ range .Entries }}<entry>
<id>{{ index site.URLs 0 }}{{ .Path }}</id>
<title>{{ .Title }}</title>
<updated>{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}</updated>
{{- $path := .Path }}
{{- range site.URLs }}
<link href="{{ . }}{{ $path }}" rel="alternate">
<link href="{{ . }}{{ $path }}" rel="alternate"/>
{{- end }}
</entry>
{{ end -}}

Loading…
Cancel
Save