Remove unused config

This commit is contained in:
Jan-Lukas Else 2020-11-09 19:34:22 +01:00
parent f073c53004
commit 7364cfed59
2 changed files with 14 additions and 21 deletions

View File

@ -88,7 +88,7 @@ func (p *post) toASNote() *asNote {
// Content
as.Content = string(p.html())
// Attachments
if images := p.Parameters[appConfig.Blogs[p.Blog].ActivityStreams.ImagesParameter]; len(images) > 0 {
if images := p.Parameters["images"]; len(images) > 0 {
for _, image := range images {
as.Attachment = append(as.Attachment, &asAttachment{
Type: "Image",
@ -109,7 +109,7 @@ func (p *post) toASNote() *asNote {
}
}
// Reply
if replyLink := p.firstParameter(appConfig.Blogs[p.Blog].ActivityStreams.ReplyParameter); replyLink != "" {
if replyLink := p.firstParameter("replylink"); replyLink != "" {
as.InReplyTo = replyLink
}
return as

View File

@ -44,19 +44,18 @@ type configCache struct {
}
type configBlog struct {
Path string `mapstructure:"path"`
Lang string `mapstructure:"lang"`
TimeLang string `mapstructure:"timelang"`
Title string `mapstructure:"title"`
Description string `mapstructure:"description"`
Pagination int `mapstructure:"pagination"`
Sections map[string]*section `mapstructure:"sections"`
Taxonomies []*taxonomy `mapstructure:"taxonomies"`
Menus map[string]*menu `mapstructure:"menus"`
Photos *photos `mapstructure:"photos"`
ActivityStreams *activityStreams `mapstructure:"activitystreams"`
DefaultSection string `mapstructure:"defaultsection"`
CustomPages []*customPage `mapstructure:"custompages"`
Path string `mapstructure:"path"`
Lang string `mapstructure:"lang"`
TimeLang string `mapstructure:"timelang"`
Title string `mapstructure:"title"`
Description string `mapstructure:"description"`
Pagination int `mapstructure:"pagination"`
Sections map[string]*section `mapstructure:"sections"`
Taxonomies []*taxonomy `mapstructure:"taxonomies"`
Menus map[string]*menu `mapstructure:"menus"`
Photos *photos `mapstructure:"photos"`
DefaultSection string `mapstructure:"defaultsection"`
CustomPages []*customPage `mapstructure:"custompages"`
}
type section struct {
@ -89,12 +88,6 @@ type photos struct {
Description string `mapstructure:"description"`
}
type activityStreams struct {
Enabled bool `mapstructure:"enabled"`
ReplyParameter string `mapstructure:"replyParameter"`
ImagesParameter string `mapstructure:"imagesParameter"`
}
type customPage struct {
Path string `mapstructure:"path"`
Template string `mapstructure:"template"`