27 lines
642 B
Go
27 lines
642 B
Go
package site
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"git.rdelaage.ovh/rdelaage/cyanocorax/model/author"
|
|
"git.rdelaage.ovh/rdelaage/cyanocorax/model/post"
|
|
"git.rdelaage.ovh/rdelaage/cyanocorax/model/page"
|
|
)
|
|
|
|
type Site struct {
|
|
Name string `json:"name"`
|
|
Icon string `json:"icon"`
|
|
Authors []author.Author `json:"authors"`
|
|
Posts []post.Post `json:"posts"`
|
|
Pages []page.Page `json:"pages"`
|
|
Abstract []string `json:"abstract"`
|
|
}
|
|
|
|
func (s *Site) GetAbstract() string {
|
|
return strings.Join(s.Abstract, "\n")
|
|
}
|
|
|
|
func (s *Site) SetAbstract(newAbstract string) {
|
|
s.Abstract = strings.Split(newAbstract, "\n")
|
|
}
|