Add notice atop md->gmi translated pages

This commit is contained in:
Brian Picciano 2023-01-24 13:19:23 +01:00
parent b766eefe7c
commit 3f97311514
2 changed files with 12 additions and 0 deletions

View File

@ -203,6 +203,10 @@ func (a *api) tplHandler() (gemini.Handler, error) {
path := filepath.Join("posts", id) + ".gmi"
return blogURL(a.params.PublicURL, path, true)
},
"PostHTTPURL": func(id string) string {
path := filepath.Join("posts", id)
return preprocessFuncs.BlogHTTPURL(path)
},
})
err := fs.WalkDir(tplFS, "tpl", func(path string, d fs.DirEntry, err error) error {

View File

@ -1,5 +1,13 @@
{{ $post := .GetPostByID (.GetQueryValue "id" "") -}}
{{ if eq $post.Format "md" -}}
This post has been translated from it's original markdown format, if it seems
busted it might appear better over HTTP:
=> {{ PostHTTPURL $post.ID }}
{{ end -}}
# {{ $post.Title }}
{{ if ne $post.Description "" -}}