Browse Source

Add a shameless promotion of Yarn.social in all feeds preamble

pull/14/head
James Mills 1 month ago
parent
commit
f3e081b702
Signed by: prologic GPG Key ID: AC4C014F1440EBD6
  1. 4
      Makefile
  2. 2
      handlers.go
  3. 3
      templates.go

4
Makefile

@ -1,8 +1,8 @@
.PHONY: dev build install image test release clean
VERSION=$(shell git describe --abbrev=0 --tags 2>/dev/null || echo "$VERSION")
COMMIT=$(shell git rev-parse --short HEAD || echo "$COMMIT")
CGO_ENABLED=0
VERSION=$(shell git describe --abbrev=0 --tags)
COMMIT=$(shell git rev-parse --short HEAD)
all: dev

2
handlers.go

@ -185,6 +185,8 @@ func (app *App) FeedHandler(w http.ResponseWriter, r *http.Request) {
"Avatar": feed.Avatar,
"Description": feed.Description,
"LastModified": fileInfo.ModTime().UTC().Format(time.RFC3339),
"SoftwareVersion": FullVersion(),
}
preamble, err := RenderPlainText(preambleTemplate, ctx)

3
templates.go

@ -23,6 +23,9 @@ const preambleTemplate = `# Twtxt is an open, distributed microblogging platform
#
# Learn more about twtxt at https://github.com/buckket/twtxt
#
# This is an automated Yarn.social feed running feeds v{{ .SoftwareVersion }}
# Learn more about Yarn.social at https://yarn.social
#
# nick = {{ .Name }}
# url = {{ .URL }}
# source = {{ .Source }}

Loading…
Cancel
Save