@zeropress/build-core 0.6.12 → 0.6.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeropress/build-core",
3
- "version": "0.6.12",
3
+ "version": "0.6.13",
4
4
  "description": "Shared ZeroPress build core",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@zeropress/slug-policy": "0.1.0",
37
- "@zeropress/preview-data-validator": "0.6.12",
37
+ "@zeropress/preview-data-validator": "0.6.13",
38
38
  "@zeropress/theme-validator": "0.6.5",
39
39
  "highlight.js": "11.11.1",
40
40
  "markdown-it": "14.2.0",
@@ -1248,11 +1248,11 @@ function resolveWidgetItem(item, previewData, renderData, widgetAreaId, index) {
1248
1248
  function resolveRecentPostsWidget(baseWidget, settings, renderData) {
1249
1249
  const limit = clampInteger(settings?.limit, 5, 1, 20);
1250
1250
  const items = renderData.posts
1251
- .filter((post) => !isDelistedDocument(post))
1251
+ .filter((post) => post.status === 'published' && !isDelistedDocument(post))
1252
1252
  .slice(0, limit)
1253
1253
  .map((post) => ({
1254
1254
  title: post.title,
1255
- url: `/posts/${encodeSlugSegment(post.slug)}/`,
1255
+ url: post.url,
1256
1256
  published_at: post.published_at,
1257
1257
  published_at_iso: post.published_at_iso,
1258
1258
  }));