mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-10 10:45:41 +01:00
Syndicate is working! Instagra & Pixelfed demonstrated with the new post attached. Lots of TODOs, but functional enough :)
16 lines
339 B
Go
16 lines
339 B
Go
package text
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/by-jp/www.byjp.me/tools/syndicate/shared"
|
|
strip "github.com/grokify/html-strip-tags-go"
|
|
)
|
|
|
|
func StripHTML(s string) string {
|
|
return strings.TrimSpace(strip.StripTags(s))
|
|
}
|
|
|
|
func Caption(p shared.Post) string {
|
|
return p.Title + " · " + StripHTML(p.Summary) + "\n·\nOriginal: " + p.URL
|
|
}
|