bunki 0.13.2 → 0.14.1
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/cli.js +34 -24
- package/dist/index.js +34 -24
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -33105,33 +33105,39 @@ async function parseMarkdownFile(filePath) {
|
|
|
33105
33105
|
excerpt: data.excerpt || extractExcerpt(content),
|
|
33106
33106
|
html: sanitizedHtml,
|
|
33107
33107
|
...data.location && {
|
|
33108
|
-
location: {
|
|
33109
|
-
|
|
33110
|
-
|
|
33111
|
-
|
|
33112
|
-
|
|
33113
|
-
|
|
33108
|
+
location: (() => {
|
|
33109
|
+
const loc = Array.isArray(data.location) ? data.location[0] : data.location;
|
|
33110
|
+
return {
|
|
33111
|
+
name: loc.name,
|
|
33112
|
+
address: loc.address,
|
|
33113
|
+
lat: loc.lat || loc.latitude,
|
|
33114
|
+
lng: loc.lng || loc.longitude
|
|
33115
|
+
};
|
|
33116
|
+
})()
|
|
33114
33117
|
},
|
|
33115
33118
|
...data.category && { category: data.category },
|
|
33116
33119
|
...data.business && {
|
|
33117
|
-
business: {
|
|
33118
|
-
|
|
33119
|
-
|
|
33120
|
-
|
|
33121
|
-
|
|
33122
|
-
|
|
33123
|
-
|
|
33124
|
-
|
|
33125
|
-
|
|
33126
|
-
|
|
33127
|
-
|
|
33128
|
-
|
|
33129
|
-
|
|
33130
|
-
|
|
33131
|
-
|
|
33132
|
-
|
|
33133
|
-
|
|
33134
|
-
|
|
33120
|
+
business: (() => {
|
|
33121
|
+
const biz = Array.isArray(data.business) ? data.business[0] : data.business;
|
|
33122
|
+
return {
|
|
33123
|
+
type: biz.type,
|
|
33124
|
+
name: biz.name,
|
|
33125
|
+
address: biz.address,
|
|
33126
|
+
lat: biz.lat || biz.latitude,
|
|
33127
|
+
lng: biz.lng || biz.longitude,
|
|
33128
|
+
...biz.cuisine && { cuisine: biz.cuisine },
|
|
33129
|
+
...biz.priceRange && {
|
|
33130
|
+
priceRange: biz.priceRange
|
|
33131
|
+
},
|
|
33132
|
+
...biz.telephone && {
|
|
33133
|
+
telephone: biz.telephone
|
|
33134
|
+
},
|
|
33135
|
+
...biz.url && { url: biz.url },
|
|
33136
|
+
...biz.openingHours && {
|
|
33137
|
+
openingHours: biz.openingHours
|
|
33138
|
+
}
|
|
33139
|
+
};
|
|
33140
|
+
})()
|
|
33135
33141
|
}
|
|
33136
33142
|
};
|
|
33137
33143
|
return { post, error: null };
|
|
@@ -33495,6 +33501,10 @@ class SiteGenerator {
|
|
|
33495
33501
|
const tags = {};
|
|
33496
33502
|
posts.forEach((post) => {
|
|
33497
33503
|
post.tagSlugs = {};
|
|
33504
|
+
const imageUrl = extractFirstImageUrl(post.html, this.options.config.baseUrl);
|
|
33505
|
+
if (imageUrl) {
|
|
33506
|
+
post.image = imageUrl;
|
|
33507
|
+
}
|
|
33498
33508
|
post.tags.forEach((tagName) => {
|
|
33499
33509
|
const tagSlug = import_slugify.default(tagName, { lower: true, strict: true });
|
|
33500
33510
|
post.tagSlugs[tagName] = tagSlug;
|
package/dist/index.js
CHANGED
|
@@ -30723,33 +30723,39 @@ async function parseMarkdownFile(filePath) {
|
|
|
30723
30723
|
excerpt: data.excerpt || extractExcerpt(content),
|
|
30724
30724
|
html: sanitizedHtml,
|
|
30725
30725
|
...data.location && {
|
|
30726
|
-
location: {
|
|
30727
|
-
|
|
30728
|
-
|
|
30729
|
-
|
|
30730
|
-
|
|
30731
|
-
|
|
30726
|
+
location: (() => {
|
|
30727
|
+
const loc = Array.isArray(data.location) ? data.location[0] : data.location;
|
|
30728
|
+
return {
|
|
30729
|
+
name: loc.name,
|
|
30730
|
+
address: loc.address,
|
|
30731
|
+
lat: loc.lat || loc.latitude,
|
|
30732
|
+
lng: loc.lng || loc.longitude
|
|
30733
|
+
};
|
|
30734
|
+
})()
|
|
30732
30735
|
},
|
|
30733
30736
|
...data.category && { category: data.category },
|
|
30734
30737
|
...data.business && {
|
|
30735
|
-
business: {
|
|
30736
|
-
|
|
30737
|
-
|
|
30738
|
-
|
|
30739
|
-
|
|
30740
|
-
|
|
30741
|
-
|
|
30742
|
-
|
|
30743
|
-
|
|
30744
|
-
|
|
30745
|
-
|
|
30746
|
-
|
|
30747
|
-
|
|
30748
|
-
|
|
30749
|
-
|
|
30750
|
-
|
|
30751
|
-
|
|
30752
|
-
|
|
30738
|
+
business: (() => {
|
|
30739
|
+
const biz = Array.isArray(data.business) ? data.business[0] : data.business;
|
|
30740
|
+
return {
|
|
30741
|
+
type: biz.type,
|
|
30742
|
+
name: biz.name,
|
|
30743
|
+
address: biz.address,
|
|
30744
|
+
lat: biz.lat || biz.latitude,
|
|
30745
|
+
lng: biz.lng || biz.longitude,
|
|
30746
|
+
...biz.cuisine && { cuisine: biz.cuisine },
|
|
30747
|
+
...biz.priceRange && {
|
|
30748
|
+
priceRange: biz.priceRange
|
|
30749
|
+
},
|
|
30750
|
+
...biz.telephone && {
|
|
30751
|
+
telephone: biz.telephone
|
|
30752
|
+
},
|
|
30753
|
+
...biz.url && { url: biz.url },
|
|
30754
|
+
...biz.openingHours && {
|
|
30755
|
+
openingHours: biz.openingHours
|
|
30756
|
+
}
|
|
30757
|
+
};
|
|
30758
|
+
})()
|
|
30753
30759
|
}
|
|
30754
30760
|
};
|
|
30755
30761
|
return { post, error: null };
|
|
@@ -31442,6 +31448,10 @@ class SiteGenerator {
|
|
|
31442
31448
|
const tags = {};
|
|
31443
31449
|
posts.forEach((post) => {
|
|
31444
31450
|
post.tagSlugs = {};
|
|
31451
|
+
const imageUrl = extractFirstImageUrl(post.html, this.options.config.baseUrl);
|
|
31452
|
+
if (imageUrl) {
|
|
31453
|
+
post.image = imageUrl;
|
|
31454
|
+
}
|
|
31445
31455
|
post.tags.forEach((tagName) => {
|
|
31446
31456
|
const tagSlug = import_slugify.default(tagName, { lower: true, strict: true });
|
|
31447
31457
|
post.tagSlugs[tagName] = tagSlug;
|
package/dist/types.d.ts
CHANGED
|
@@ -62,6 +62,8 @@ export interface Post {
|
|
|
62
62
|
category?: string;
|
|
63
63
|
/** Optional business schema data for LocalBusiness structured data */
|
|
64
64
|
business?: Business;
|
|
65
|
+
/** Optional image URL (first image from post content, used for thumbnails and social sharing) */
|
|
66
|
+
image?: string;
|
|
65
67
|
}
|
|
66
68
|
/**
|
|
67
69
|
* Configuration for CSS processing
|
package/package.json
CHANGED