mirror of https://github.com/jlelse/GoBlog
Remove unused config
This commit is contained in:
parent
f073c53004
commit
7364cfed59
|
@ -88,7 +88,7 @@ func (p *post) toASNote() *asNote {
|
||||||
// Content
|
// Content
|
||||||
as.Content = string(p.html())
|
as.Content = string(p.html())
|
||||||
// Attachments
|
// 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 {
|
for _, image := range images {
|
||||||
as.Attachment = append(as.Attachment, &asAttachment{
|
as.Attachment = append(as.Attachment, &asAttachment{
|
||||||
Type: "Image",
|
Type: "Image",
|
||||||
|
@ -109,7 +109,7 @@ func (p *post) toASNote() *asNote {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Reply
|
// Reply
|
||||||
if replyLink := p.firstParameter(appConfig.Blogs[p.Blog].ActivityStreams.ReplyParameter); replyLink != "" {
|
if replyLink := p.firstParameter("replylink"); replyLink != "" {
|
||||||
as.InReplyTo = replyLink
|
as.InReplyTo = replyLink
|
||||||
}
|
}
|
||||||
return as
|
return as
|
||||||
|
|
31
config.go
31
config.go
|
@ -44,19 +44,18 @@ type configCache struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type configBlog struct {
|
type configBlog struct {
|
||||||
Path string `mapstructure:"path"`
|
Path string `mapstructure:"path"`
|
||||||
Lang string `mapstructure:"lang"`
|
Lang string `mapstructure:"lang"`
|
||||||
TimeLang string `mapstructure:"timelang"`
|
TimeLang string `mapstructure:"timelang"`
|
||||||
Title string `mapstructure:"title"`
|
Title string `mapstructure:"title"`
|
||||||
Description string `mapstructure:"description"`
|
Description string `mapstructure:"description"`
|
||||||
Pagination int `mapstructure:"pagination"`
|
Pagination int `mapstructure:"pagination"`
|
||||||
Sections map[string]*section `mapstructure:"sections"`
|
Sections map[string]*section `mapstructure:"sections"`
|
||||||
Taxonomies []*taxonomy `mapstructure:"taxonomies"`
|
Taxonomies []*taxonomy `mapstructure:"taxonomies"`
|
||||||
Menus map[string]*menu `mapstructure:"menus"`
|
Menus map[string]*menu `mapstructure:"menus"`
|
||||||
Photos *photos `mapstructure:"photos"`
|
Photos *photos `mapstructure:"photos"`
|
||||||
ActivityStreams *activityStreams `mapstructure:"activitystreams"`
|
DefaultSection string `mapstructure:"defaultsection"`
|
||||||
DefaultSection string `mapstructure:"defaultsection"`
|
CustomPages []*customPage `mapstructure:"custompages"`
|
||||||
CustomPages []*customPage `mapstructure:"custompages"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type section struct {
|
type section struct {
|
||||||
|
@ -89,12 +88,6 @@ type photos struct {
|
||||||
Description string `mapstructure:"description"`
|
Description string `mapstructure:"description"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type activityStreams struct {
|
|
||||||
Enabled bool `mapstructure:"enabled"`
|
|
||||||
ReplyParameter string `mapstructure:"replyParameter"`
|
|
||||||
ImagesParameter string `mapstructure:"imagesParameter"`
|
|
||||||
}
|
|
||||||
|
|
||||||
type customPage struct {
|
type customPage struct {
|
||||||
Path string `mapstructure:"path"`
|
Path string `mapstructure:"path"`
|
||||||
Template string `mapstructure:"template"`
|
Template string `mapstructure:"template"`
|
||||||
|
|
Loading…
Reference in New Issue