Wrap all feed tags in conditions
This commit is contained in:
		| @@ -60,7 +60,9 @@ | ||||
|         <icon>{{ . }}</icon> | ||||
|     {{ end }} | ||||
|  | ||||
|     <id>{{ $id }}</id> | ||||
|     {{ with $id }} | ||||
|         <id>{{ . }}</id> | ||||
|     {{ end }} | ||||
|  | ||||
|     {{ range $page.OutputFormats }} | ||||
|         {{ $rel := cond (eq .Rel "canonical") "self" .Rel }} | ||||
| @@ -86,9 +88,13 @@ | ||||
|         <subtitle type="html"><![CDATA[{{ . }}]]></subtitle> | ||||
|     {{ end }} | ||||
|  | ||||
|     <title type="html"><![CDATA[{{ $title }}]]></title> | ||||
|     {{ with $title }} | ||||
|         <title type="html"><![CDATA[{{ . }}]]></title> | ||||
|     {{ end }} | ||||
|  | ||||
|     <updated>{{ $lastmod }}</updated> | ||||
|     {{ with $lastmod }} | ||||
|         <updated>{{ . }}</updated> | ||||
|     {{ end }} | ||||
|  | ||||
|     {{ range $subpages }} | ||||
|         {{ $include := not (.Param "paige.exclude_feeds") }} | ||||
| @@ -139,7 +145,9 @@ | ||||
|                     <content type="html"><![CDATA[{{ . }}]]></content> | ||||
|                 {{ end }} | ||||
|  | ||||
|                 <id>{{ $id }}</id> | ||||
|                 {{ with $id }} | ||||
|                     <id>{{ . }}</id> | ||||
|                 {{ end }} | ||||
|  | ||||
|                 {{ range .OutputFormats }} | ||||
|                     {{ $rel := cond (eq .Rel "canonical") "self" .Rel }} | ||||
| @@ -171,7 +179,9 @@ | ||||
|                     <title type="html"><![CDATA[{{ . }}]]></title> | ||||
|                 {{ end }} | ||||
|  | ||||
|                 <updated>{{ $lastmod }}</updated> | ||||
|                 {{ with $lastmod }} | ||||
|                     <updated>{{ . }}</updated> | ||||
|                 {{ end }} | ||||
|             </entry> | ||||
|         {{ end }} | ||||
|     {{ end }} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user