Add self links to feeds
This commit is contained in:
@@ -64,6 +64,10 @@
|
|||||||
<id>{{ . }}</id>
|
<id>{{ . }}</id>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{ with $page.OutputFormats.Get "atom" }}
|
||||||
|
<link href="{{ .Permalink }}" hreflang="{{ $page.Language.LanguageCode }}" rel="self" type="application/atom+xml"/>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ range $page.OutputFormats }}
|
{{ range $page.OutputFormats }}
|
||||||
{{ $rel := cond (eq .Rel "canonical") "alternate" .Rel }}
|
{{ $rel := cond (eq .Rel "canonical") "alternate" .Rel }}
|
||||||
|
|
||||||
@@ -152,6 +156,8 @@
|
|||||||
<id>{{ . }}</id>
|
<id>{{ . }}</id>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
<link href="{{ $subpage.Permalink }}" hreflang="{{ $subpage.Language.LanguageCode }}" rel="self" type="text/html"/>
|
||||||
|
|
||||||
{{ range $subpage.OutputFormats }}
|
{{ range $subpage.OutputFormats }}
|
||||||
{{ $rel := cond (eq .Rel "canonical") "alternate" .Rel }}
|
{{ $rel := cond (eq .Rel "canonical") "alternate" .Rel }}
|
||||||
|
|
||||||
|
@@ -40,6 +40,10 @@
|
|||||||
|
|
||||||
<rss version="2.0" {{ with $language }} xml:lang="{{ . }}" {{ end }} xmlns:atom="http://www.w3.org/2005/Atom">
|
<rss version="2.0" {{ with $language }} xml:lang="{{ . }}" {{ end }} xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
<channel>
|
<channel>
|
||||||
|
{{ with $page.OutputFormats.Get "rss" }}
|
||||||
|
<atom:link href="{{ .Permalink }}" hreflang="{{ $page.Language.LanguageCode }}" rel="self" type="application/rss+xml"/>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ range $page.OutputFormats }}
|
{{ range $page.OutputFormats }}
|
||||||
{{ $rel := cond (eq .Rel "canonical") "alternate" .Rel }}
|
{{ $rel := cond (eq .Rel "canonical") "alternate" .Rel }}
|
||||||
|
|
||||||
@@ -139,6 +143,8 @@
|
|||||||
<link>{{ . }}</link>
|
<link>{{ . }}</link>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
<atom:link href="{{ $subpage.Permalink }}" hreflang="{{ $subpage.Language.LanguageCode }}" rel="self" type="text/html"/>
|
||||||
|
|
||||||
{{ range $subpage.OutputFormats }}
|
{{ range $subpage.OutputFormats }}
|
||||||
{{ $rel := cond (eq .Rel "canonical") "alternate" .Rel }}
|
{{ $rel := cond (eq .Rel "canonical") "alternate" .Rel }}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user