gemini atom feed hugo fixes
This commit is contained in:
parent
56034e3d04
commit
aa5077b032
|
@ -15,20 +15,23 @@
|
|||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
|
||||
<title>{{ .Site.Title }}</title>
|
||||
<link rel="self" type="application/atom+xml" href="{{ .Permalink }}"/>
|
||||
<link rel="alternate" type="text/html" href="{{ .Site.BaseURL | replaceRE `https?://(.+?)` "gemini://$1" }}"/>
|
||||
{{- $perm := replace .Permalink "/gemini" "" 1 -}}
|
||||
{{- $alt := .Site.BaseURL | replaceRE `https?://(.+?)` "gemini://$1" -}}
|
||||
{{ printf "<link rel=\"self\" type=\"application/atom+xml\" href=\"%s\"/>" $perm | safeHTML }}
|
||||
{{ printf "<link rel=\"alternate\" type=\"text/html\" href=\"%s\"/>" $alt | safeHTML }}
|
||||
<updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
|
||||
<author>
|
||||
<name>{{ .Site.Author.name }}</name>
|
||||
<uri>{{ .Site.BaseURL | replaceRE `https?://(.+?)` "gemini://$1" }}</uri>
|
||||
</author>
|
||||
<id>{{ .Permalink }}</id>
|
||||
<id>{{ $perm }}</id>
|
||||
{{ range $pages }}
|
||||
{{ if in $allowedRssSections .Section }}
|
||||
<entry>
|
||||
<title>{{ .Title }}</title>
|
||||
<link rel="alternate" href="{{ .Permalink }}"/>
|
||||
<id>{{ .Permalink | replaceRE `https?://(.+?)` "gemini://$1" }}</id>
|
||||
{{- $entryperm := .Permalink | replaceRE `https?://(.+?)` "gemini://$1" -}}
|
||||
{{ printf "<link rel=\"alternate\" href=\"%s\"/>" $entryperm | safeHTML }}
|
||||
<id>{{ $entryperm }}</id>
|
||||
<published>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</published>
|
||||
<updated>{{ .Lastmod.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
|
||||
<summary>{{ if isset .Params "subtitle" }}{{ .Params.subtitle }}{{ else }}{{ .Summary | html }}{{ end }}</summary>
|
||||
|
|
Loading…
Reference in New Issue