add public filter to site
This commit is contained in:
parent
571c1df0a2
commit
f12035df9c
|
@ -47,7 +47,12 @@ func (s *Site) AddFilePost(fPath string) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
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 {
|
if post.Kind != KIND_INVALID {
|
||||||
s.posts = append(s.posts, post)
|
s.posts = append(s.posts, post)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue