From 546f914789cea86beccbfdc01e15a85aeec9805b Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 9 Sep 2026 14:21:26 +1000 Subject: [PATCH] fix: filter draft (published:false) out of subject index, ribbon dropdowns, and Topics boxes too --- app/src/content.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/content.go b/app/src/content.go index 37a64dd..ce64039 100644 --- a/app/src/content.go +++ b/app/src/content.go @@ -158,6 +158,15 @@ func (c *Content) loadSubject(slug string) (*Subject, error) { if err := c.loadFilesUnder(dir, &s.Articles); err != nil { return nil, err } + // drafts (published:false) are not part of the subject — this hides them from + // the subject index, ribbon dropdowns, and Topics boxes, not just the article route. + var pub []*Article + for _, a := range s.Articles { + if a.FM.Published { + pub = append(pub, a) + } + } + s.Articles = pub // newest first within a subject (drives Topics boxes + ribbon dropdowns) sortArticles(s.Articles) for _, a := range s.Articles {