feat(blog): add subscription-only content gating
Adds SubscriptionOnly flag to blog posts to restrict full content access to active subscribers. Shows teaser/preview for non-subscribers with subscribe CTA. Integrates with repository subscription system when monetization is enabled. Updates v2 API structs and editor UI with subscription toggle. Admins and repo writers bypass the gate.
This commit is contained in:
@@ -16,6 +16,7 @@ type BlogPostV2 struct {
|
||||
Tags []string `json:"tags"`
|
||||
Status string `json:"status"`
|
||||
AllowComments bool `json:"allow_comments"`
|
||||
SubscriptionOnly bool `json:"subscription_only"`
|
||||
FeaturedImageURL string `json:"featured_image_url,omitempty"`
|
||||
Author *BlogAuthorV2 `json:"author,omitempty"`
|
||||
Repo *BlogRepoRefV2 `json:"repo,omitempty"`
|
||||
@@ -56,6 +57,7 @@ type CreateBlogPostV2Option struct {
|
||||
Tags []string `json:"tags"`
|
||||
Status string `json:"status"` // draft, public, published
|
||||
AllowComments bool `json:"allow_comments"`
|
||||
SubscriptionOnly bool `json:"subscription_only"`
|
||||
FeaturedImageUUID string `json:"featured_image_uuid"`
|
||||
}
|
||||
|
||||
@@ -68,5 +70,6 @@ type UpdateBlogPostV2Option struct {
|
||||
Tags []string `json:"tags"`
|
||||
Status *string `json:"status"` // draft, public, published
|
||||
AllowComments *bool `json:"allow_comments"`
|
||||
SubscriptionOnly *bool `json:"subscription_only"`
|
||||
FeaturedImageUUID *string `json:"featured_image_uuid"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user