@xexr/blog-platform 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,6 +30,9 @@ export const bpArticles = sqliteTable(
30
30
  updatedAt: text("updated_at").notNull(),
31
31
  featuredImage: text("featured_image"),
32
32
  featuredImageAlt: text("featured_image_alt"),
33
+ featuredImageCaption: text("featured_image_caption"),
34
+ featuredImageCreditText: text("featured_image_credit_text"),
35
+ featuredImageCreditUrl: text("featured_image_credit_url"),
33
36
  // Store complex objects as JSON strings
34
37
  authorJson: text("author_json"),
35
38
  siteJson: text("site_json").notNull(),
@@ -65,6 +68,9 @@ function toRow(article: PublishedArticle): ArticleRow {
65
68
  updatedAt: article.updatedAt,
66
69
  featuredImage: article.featuredImage ?? null,
67
70
  featuredImageAlt: article.featuredImageAlt ?? null,
71
+ featuredImageCaption: article.featuredImageCaption ?? null,
72
+ featuredImageCreditText: article.featuredImageCreditText ?? null,
73
+ featuredImageCreditUrl: article.featuredImageCreditUrl ?? null,
68
74
  authorJson: article.author ? JSON.stringify(article.author) : null,
69
75
  siteJson: JSON.stringify(article.site),
70
76
  metaJson: JSON.stringify({
@@ -88,6 +94,9 @@ function fromRow(row: ArticleRow): PublishedArticle {
88
94
  updatedAt: row.updatedAt,
89
95
  featuredImage: row.featuredImage ?? undefined,
90
96
  featuredImageAlt: row.featuredImageAlt ?? undefined,
97
+ featuredImageCaption: row.featuredImageCaption ?? undefined,
98
+ featuredImageCreditText: row.featuredImageCreditText ?? undefined,
99
+ featuredImageCreditUrl: row.featuredImageCreditUrl ?? undefined,
91
100
  author: row.authorJson
92
101
  ? (JSON.parse(row.authorJson) as PublishedAuthor)
93
102
  : null,
@@ -204,6 +213,9 @@ export class DrizzleStorage implements BlogPlatformStorage {
204
213
  updatedAt: row.updatedAt,
205
214
  featuredImage: row.featuredImage,
206
215
  featuredImageAlt: row.featuredImageAlt,
216
+ featuredImageCaption: row.featuredImageCaption,
217
+ featuredImageCreditText: row.featuredImageCreditText,
218
+ featuredImageCreditUrl: row.featuredImageCreditUrl,
207
219
  authorJson: row.authorJson,
208
220
  siteJson: row.siteJson,
209
221
  metaJson: row.metaJson,
@@ -385,6 +397,9 @@ export function getDrizzleAdapterSql(): {
385
397
  updated_at TEXT NOT NULL,
386
398
  featured_image TEXT,
387
399
  featured_image_alt TEXT,
400
+ featured_image_caption TEXT,
401
+ featured_image_credit_text TEXT,
402
+ featured_image_credit_url TEXT,
388
403
  author_json TEXT,
389
404
  site_json TEXT NOT NULL,
390
405
  meta_json TEXT NOT NULL,
@@ -87,6 +87,32 @@ export interface PublishedSite {
87
87
 
88
88
  /** Default locale/language code */
89
89
  readonly locale: string;
90
+
91
+ /** Optional Bloggy-owned newsletter capture configuration */
92
+ readonly newsletter?: PublishedNewsletterSettings;
93
+ }
94
+
95
+ /**
96
+ * Public configuration for Bloggy-owned newsletter capture.
97
+ */
98
+ export interface PublishedNewsletterSettings {
99
+ /** Whether the capture form should render */
100
+ readonly enabled: boolean;
101
+
102
+ /** Form heading */
103
+ readonly title: string;
104
+
105
+ /** Form supporting copy */
106
+ readonly description: string;
107
+
108
+ /** Submit button label */
109
+ readonly buttonLabel: string;
110
+
111
+ /** Base URL for the Bloggy instance that receives subscriptions */
112
+ readonly captureBaseUrl: string;
113
+
114
+ /** Site-scoped public token used to validate public submissions */
115
+ readonly publicSubscribeToken: string;
90
116
  }
91
117
 
92
118
  /**
@@ -156,6 +182,15 @@ export interface PublishedArticle {
156
182
  /** Alt text for featured image */
157
183
  readonly featuredImageAlt?: string;
158
184
 
185
+ /** Caption displayed with the featured image */
186
+ readonly featuredImageCaption?: string;
187
+
188
+ /** Credit text displayed with the featured image */
189
+ readonly featuredImageCreditText?: string;
190
+
191
+ /** Optional URL for the featured image credit */
192
+ readonly featuredImageCreditUrl?: string;
193
+
159
194
  /** Featured image R2 key for CDN optimization (optional) */
160
195
  readonly featuredImageKey?: string;
161
196
 
@@ -65,6 +65,25 @@ interface PublishedSite {
65
65
  readonly toneAdjectives: readonly string[];
66
66
  /** Default locale/language code */
67
67
  readonly locale: string;
68
+ /** Optional Bloggy-owned newsletter capture configuration */
69
+ readonly newsletter?: PublishedNewsletterSettings;
70
+ }
71
+ /**
72
+ * Public configuration for Bloggy-owned newsletter capture.
73
+ */
74
+ interface PublishedNewsletterSettings {
75
+ /** Whether the capture form should render */
76
+ readonly enabled: boolean;
77
+ /** Form heading */
78
+ readonly title: string;
79
+ /** Form supporting copy */
80
+ readonly description: string;
81
+ /** Submit button label */
82
+ readonly buttonLabel: string;
83
+ /** Base URL for the Bloggy instance that receives subscriptions */
84
+ readonly captureBaseUrl: string;
85
+ /** Site-scoped public token used to validate public submissions */
86
+ readonly publicSubscribeToken: string;
68
87
  }
69
88
  /**
70
89
  * Public topic/category taxonomy assigned to published articles.
@@ -114,6 +133,12 @@ interface PublishedArticle {
114
133
  readonly featuredImage?: string;
115
134
  /** Alt text for featured image */
116
135
  readonly featuredImageAlt?: string;
136
+ /** Caption displayed with the featured image */
137
+ readonly featuredImageCaption?: string;
138
+ /** Credit text displayed with the featured image */
139
+ readonly featuredImageCreditText?: string;
140
+ /** Optional URL for the featured image credit */
141
+ readonly featuredImageCreditUrl?: string;
117
142
  /** Featured image R2 key for CDN optimization (optional) */
118
143
  readonly featuredImageKey?: string;
119
144
  /** SEO meta tags */
@@ -177,4 +202,4 @@ interface PublishResult {
177
202
  readonly idempotencyKey: string;
178
203
  }
179
204
 
180
- export type { PublishPayload, PublishResult, PublishedArticle, PublishedAuthor, PublishedAuthorSocialLinks, PublishedSite, PublishedTopic };
205
+ export type { PublishPayload, PublishResult, PublishedArticle, PublishedAuthor, PublishedAuthorSocialLinks, PublishedNewsletterSettings, PublishedSite, PublishedTopic };
@@ -65,6 +65,25 @@ interface PublishedSite {
65
65
  readonly toneAdjectives: readonly string[];
66
66
  /** Default locale/language code */
67
67
  readonly locale: string;
68
+ /** Optional Bloggy-owned newsletter capture configuration */
69
+ readonly newsletter?: PublishedNewsletterSettings;
70
+ }
71
+ /**
72
+ * Public configuration for Bloggy-owned newsletter capture.
73
+ */
74
+ interface PublishedNewsletterSettings {
75
+ /** Whether the capture form should render */
76
+ readonly enabled: boolean;
77
+ /** Form heading */
78
+ readonly title: string;
79
+ /** Form supporting copy */
80
+ readonly description: string;
81
+ /** Submit button label */
82
+ readonly buttonLabel: string;
83
+ /** Base URL for the Bloggy instance that receives subscriptions */
84
+ readonly captureBaseUrl: string;
85
+ /** Site-scoped public token used to validate public submissions */
86
+ readonly publicSubscribeToken: string;
68
87
  }
69
88
  /**
70
89
  * Public topic/category taxonomy assigned to published articles.
@@ -114,6 +133,12 @@ interface PublishedArticle {
114
133
  readonly featuredImage?: string;
115
134
  /** Alt text for featured image */
116
135
  readonly featuredImageAlt?: string;
136
+ /** Caption displayed with the featured image */
137
+ readonly featuredImageCaption?: string;
138
+ /** Credit text displayed with the featured image */
139
+ readonly featuredImageCreditText?: string;
140
+ /** Optional URL for the featured image credit */
141
+ readonly featuredImageCreditUrl?: string;
117
142
  /** Featured image R2 key for CDN optimization (optional) */
118
143
  readonly featuredImageKey?: string;
119
144
  /** SEO meta tags */
@@ -177,4 +202,4 @@ interface PublishResult {
177
202
  readonly idempotencyKey: string;
178
203
  }
179
204
 
180
- export type { PublishPayload, PublishResult, PublishedArticle, PublishedAuthor, PublishedAuthorSocialLinks, PublishedSite, PublishedTopic };
205
+ export type { PublishPayload, PublishResult, PublishedArticle, PublishedAuthor, PublishedAuthorSocialLinks, PublishedNewsletterSettings, PublishedSite, PublishedTopic };
@@ -9,6 +9,7 @@ export type {
9
9
  PublishedArticle,
10
10
  PublishedAuthor,
11
11
  PublishedAuthorSocialLinks,
12
+ PublishedNewsletterSettings,
12
13
  PublishedSite,
13
14
  PublishedTopic,
14
15
  PublishPayload,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xexr/blog-platform",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "SEO-friendly blog platform for Next.js 15 with Bloggy integration",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -15,6 +15,11 @@
15
15
  "import": "./dist/types/index.mjs",
16
16
  "require": "./dist/types/index.js"
17
17
  },
18
+ "./app/blog/page": {
19
+ "types": "./dist/app/blog/page.d.ts",
20
+ "import": "./dist/app/blog/page.tsx",
21
+ "default": "./dist/app/blog/page.tsx"
22
+ },
18
23
  "./app/blog/[slug]/page": {
19
24
  "types": "./dist/app/blog/[slug]/page.d.ts",
20
25
  "import": "./dist/app/blog/[slug]/page.tsx",