From e313cb0ecf1b0af37bb51ec9ad73b35a80167e7c Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Thu, 14 Sep 2023 14:27:06 -0400 Subject: [PATCH] Add Category.IsCategory field --- category/category.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/category/category.go b/category/category.go index 4ac81c3..5a131dd 100644 --- a/category/category.go +++ b/category/category.go @@ -17,6 +17,11 @@ type Category struct { Slug string `json:"slug"` Title string `json:"title"` PostCount int64 `json:"post_count"` + + // IsCategory distinguishes this Category from a mere tag. If true, it is often prominently featured on a blog, + // and looked up via its Slug instead of its Hashtag. It usually has all metadata, such as Title, correctly + // populated. + IsCategory bool `json:"-"` } // NewCategory creates a Category you can insert into the database, based on a hashtag. It automatically breaks up the