diff options
Diffstat (limited to 'themes/default/layouts/partials/base-discovery.html')
-rw-r--r-- | themes/default/layouts/partials/base-discovery.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/base-discovery.html b/themes/default/layouts/partials/base-discovery.html new file mode 100644 index 0000000..4370063 --- /dev/null +++ b/themes/default/layouts/partials/base-discovery.html @@ -0,0 +1,33 @@ +{{- partial "generate-authors" . -}} + +{{- + $authorData := (dict + "Context" . + "AuthorDefaultUser" .Site.Author.default.home + ) +-}} + +{{- $author := partial "function-authors-data.html" (dict "Data" $authorData) -}} + +<link + rel="alternate" + type="application/rss+xml" + title="{{ $author.name }}'s Feed" + href="{{ .Site.BaseURL }}/{{ $author.user }}/rss.xml" +/> + +{{- with $author.feeds.rss }} + {{ range $author.feeds.rss }} + {{ $data := split . " " }} + {{- $url := delimit (first 1 $data) "" -}} + {{- $retitle := trim (delimit (after 1 $data) " ") " " -}} + {{- $retitle := and $retitle (print $retitle "'s Feed") -}} + + <link + rel="alternate" + type="application/rss+xml" + title="{{ or $retitle $url }}" + href="{{ $url }}" + /> + {{ end }} +{{- end -}} |