summaryrefslogtreecommitdiff
path: root/src/gmi
diff options
context:
space:
mode:
Diffstat (limited to 'src/gmi')
-rw-r--r--src/gmi/tpl.go8
-rw-r--r--src/gmi/tpl/feed.xml4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gmi/tpl.go b/src/gmi/tpl.go
index 566ace0..5777024 100644
--- a/src/gmi/tpl.go
+++ b/src/gmi/tpl.go
@@ -161,6 +161,9 @@ func (a *api) tplHandler() (gemini.Handler, error) {
BlogHTTPURL: func(path string) string {
return blogURL(a.params.HTTPPublicURL, path, true)
},
+ BlogGeminiURL: func(path string) string {
+ return blogURL(a.params.PublicURL, path, true)
+ },
AssetURL: func(id string) string {
path := filepath.Join("assets", id)
return blogURL(a.params.PublicURL, path, false)
@@ -193,12 +196,9 @@ func (a *api) tplHandler() (gemini.Handler, error) {
allTpls := template.New("")
- allTpls.Funcs(preprocessFuncs.ToFuncsMap())
+ allTpls.Funcs(preprocessFuncs.ToFuncMap())
allTpls.Funcs(template.FuncMap{
- "BlogURLAbs": func(path string) string {
- return blogURL(a.params.PublicURL, path, true)
- },
"PostURLAbs": func(id string) string {
path := filepath.Join("posts", id) + ".gmi"
return blogURL(a.params.PublicURL, path, true)
diff --git a/src/gmi/tpl/feed.xml b/src/gmi/tpl/feed.xml
index a33e42f..aa596b7 100644
--- a/src/gmi/tpl/feed.xml
+++ b/src/gmi/tpl/feed.xml
@@ -3,11 +3,11 @@
<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom">
<title>mediocregopher's lil web corner</title>
- <id>{{ BlogURLAbs "/" }}</id>
+ <id>{{ BlogGeminiURL "/" }}</id>
{{ if gt (len $posts) 0 -}}
<updated>{{ (index $posts 0).PublishedAt.Format "2006-01-02T15:04:05Z07:00" }}</updated>
{{ end -}}
- <link href="{{ BlogURLAbs "/" }}"></link>
+ <link href="{{ BlogGeminiURL "/" }}"></link>
<author>
<name>mediocregopher</name>
</author>