1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Show feed title instead of domain in items list

This commit is contained in:
Dave Z 2018-07-17 21:48:28 -04:00 committed by Frédéric Guillot
parent 6aa02680d8
commit 3b018bc6bf
3 changed files with 16 additions and 3 deletions

View file

@ -5,6 +5,7 @@
package template
import (
"bytes"
"html/template"
"net/mail"
"strings"
@ -77,6 +78,18 @@ func (f *funcMap) Map() template.FuncMap {
return ts.Format("2006-01-02 15:04:05")
},
"dict": dict,
"truncate": func(str string, max int) string {
if len(str) > max {
var buffer bytes.Buffer
buffer.WriteString(str[:max-1])
buffer.WriteString("…")
return buffer.String()
}
return str
},
// These functions are overrided at runtime after the parsing.
"elapsed": func(timezone string, t time.Time) string {