@xexr/blog-platform 1.0.9 → 1.0.10
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.
- package/dist/app/blog/[slug]/page.tsx +117 -13
- package/dist/index.d.mts +57 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.js +51 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +51 -11
- package/dist/index.mjs.map +1 -1
- package/dist/lib/storage/drizzle.ts +15 -0
- package/dist/types/contracts.ts +9 -0
- package/dist/types/index.d.mts +6 -0
- package/dist/types/index.d.ts +6 -0
- package/package.json +1 -1
|
@@ -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,
|
package/dist/types/contracts.ts
CHANGED
|
@@ -156,6 +156,15 @@ export interface PublishedArticle {
|
|
|
156
156
|
/** Alt text for featured image */
|
|
157
157
|
readonly featuredImageAlt?: string;
|
|
158
158
|
|
|
159
|
+
/** Caption displayed with the featured image */
|
|
160
|
+
readonly featuredImageCaption?: string;
|
|
161
|
+
|
|
162
|
+
/** Credit text displayed with the featured image */
|
|
163
|
+
readonly featuredImageCreditText?: string;
|
|
164
|
+
|
|
165
|
+
/** Optional URL for the featured image credit */
|
|
166
|
+
readonly featuredImageCreditUrl?: string;
|
|
167
|
+
|
|
159
168
|
/** Featured image R2 key for CDN optimization (optional) */
|
|
160
169
|
readonly featuredImageKey?: string;
|
|
161
170
|
|
package/dist/types/index.d.mts
CHANGED
|
@@ -114,6 +114,12 @@ interface PublishedArticle {
|
|
|
114
114
|
readonly featuredImage?: string;
|
|
115
115
|
/** Alt text for featured image */
|
|
116
116
|
readonly featuredImageAlt?: string;
|
|
117
|
+
/** Caption displayed with the featured image */
|
|
118
|
+
readonly featuredImageCaption?: string;
|
|
119
|
+
/** Credit text displayed with the featured image */
|
|
120
|
+
readonly featuredImageCreditText?: string;
|
|
121
|
+
/** Optional URL for the featured image credit */
|
|
122
|
+
readonly featuredImageCreditUrl?: string;
|
|
117
123
|
/** Featured image R2 key for CDN optimization (optional) */
|
|
118
124
|
readonly featuredImageKey?: string;
|
|
119
125
|
/** SEO meta tags */
|
package/dist/types/index.d.ts
CHANGED
|
@@ -114,6 +114,12 @@ interface PublishedArticle {
|
|
|
114
114
|
readonly featuredImage?: string;
|
|
115
115
|
/** Alt text for featured image */
|
|
116
116
|
readonly featuredImageAlt?: string;
|
|
117
|
+
/** Caption displayed with the featured image */
|
|
118
|
+
readonly featuredImageCaption?: string;
|
|
119
|
+
/** Credit text displayed with the featured image */
|
|
120
|
+
readonly featuredImageCreditText?: string;
|
|
121
|
+
/** Optional URL for the featured image credit */
|
|
122
|
+
readonly featuredImageCreditUrl?: string;
|
|
117
123
|
/** Featured image R2 key for CDN optimization (optional) */
|
|
118
124
|
readonly featuredImageKey?: string;
|
|
119
125
|
/** SEO meta tags */
|