More rendered titles

This commit is contained in:
Jan-Lukas Else 2021-08-05 14:53:22 +02:00
parent 4c8c147c4c
commit 602523b743
3 changed files with 3 additions and 2 deletions

View File

@ -164,7 +164,7 @@ func (a *goBlog) serveActivityStreams(blog string, w http.ResponseWriter, r *htt
Type: "Person",
ID: a.apIri(b),
URL: a.apIri(b),
Name: b.Title,
Name: a.renderMdTitle(b.Title),
Summary: b.Description,
PreferredUsername: blog,
Inbox: a.getFullAddress("/activitypub/inbox/" + blog),

View File

@ -24,6 +24,7 @@ func (a *goBlog) generateFeed(blog string, f feedType, w http.ResponseWriter, r
if title == "" {
title = a.cfg.Blogs[blog].Title
}
title = a.renderMdTitle(title)
if description == "" {
description = a.cfg.Blogs[blog].Description
}

View File

@ -10,7 +10,7 @@ import (
func (a *goBlog) serveOpenSearch(w http.ResponseWriter, r *http.Request) {
blog := r.Context().Value(blogKey).(string)
b := a.cfg.Blogs[blog]
title := b.Title
title := a.renderMdTitle(b.Title)
sURL := a.getFullAddress(b.getRelativePath(defaultIfEmpty(b.Search.Path, defaultSearchPath)))
xml := fmt.Sprintf("<?xml version=\"1.0\"?><OpenSearchDescription xmlns=\"http://a9.com/-/spec/opensearch/1.1/\" xmlns:moz=\"http://www.mozilla.org/2006/browser/search/\">"+
"<ShortName>%s</ShortName><Description>%s</Description>"+