add public filter to site

This commit is contained in:
Erik Winter 2021-04-15 06:46:30 +02:00
parent 571c1df0a2
commit f12035df9c
1 changed files with 6 additions and 1 deletions

View File

@ -47,7 +47,12 @@ func (s *Site) AddFilePost(fPath string) error {
if err != nil {
return err
}
post := NewPost(s.config, adoc.New(string(content)))
doc := adoc.New(string(content))
if !doc.Public {
return nil
}
post := NewPost(s.config, doc)
if post.Kind != KIND_INVALID {
s.posts = append(s.posts, post)
}