@docusaurus/plugin-content-blog 3.9.2-canary-6439 → 3.9.2-canary-6443
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/lib/routes.js +14 -6
- package/package.json +10 -10
- package/src/routes.ts +13 -7
package/lib/routes.js
CHANGED
|
@@ -197,10 +197,14 @@ async function buildAllRoutes({ baseUrl, content, actions, options, aliasedSourc
|
|
|
197
197
|
sidebar: sidebarModulePath,
|
|
198
198
|
},
|
|
199
199
|
props: {
|
|
200
|
-
authors: authors.map((author) =>
|
|
201
|
-
author
|
|
202
|
-
|
|
203
|
-
|
|
200
|
+
authors: authors.map((author) => {
|
|
201
|
+
const authorPosts = blogPostsByAuthorKey[author.key] ?? [];
|
|
202
|
+
const listedAuthorPosts = authorPosts.filter(blogUtils_1.shouldBeListed);
|
|
203
|
+
return (0, props_1.toAuthorItemProp)({
|
|
204
|
+
author,
|
|
205
|
+
count: listedAuthorPosts.length,
|
|
206
|
+
});
|
|
207
|
+
}),
|
|
204
208
|
},
|
|
205
209
|
context: {
|
|
206
210
|
blogMetadata: blogMetadataModulePath,
|
|
@@ -209,11 +213,12 @@ async function buildAllRoutes({ baseUrl, content, actions, options, aliasedSourc
|
|
|
209
213
|
}
|
|
210
214
|
function createAuthorPaginatedRoute(author) {
|
|
211
215
|
const authorBlogPosts = blogPostsByAuthorKey[author.key] ?? [];
|
|
216
|
+
const listedAuthorBlogPosts = authorBlogPosts.filter(blogUtils_1.shouldBeListed);
|
|
212
217
|
if (!author.page) {
|
|
213
218
|
return [];
|
|
214
219
|
}
|
|
215
220
|
const pages = (0, blogUtils_1.paginateBlogPosts)({
|
|
216
|
-
blogPosts:
|
|
221
|
+
blogPosts: listedAuthorBlogPosts,
|
|
217
222
|
basePageUrl: author.page.permalink,
|
|
218
223
|
blogDescription,
|
|
219
224
|
blogTitle,
|
|
@@ -230,7 +235,10 @@ async function buildAllRoutes({ baseUrl, content, actions, options, aliasedSourc
|
|
|
230
235
|
sidebar: sidebarModulePath,
|
|
231
236
|
},
|
|
232
237
|
props: {
|
|
233
|
-
author: (0, props_1.toAuthorItemProp)({
|
|
238
|
+
author: (0, props_1.toAuthorItemProp)({
|
|
239
|
+
author,
|
|
240
|
+
count: listedAuthorBlogPosts.length,
|
|
241
|
+
}),
|
|
234
242
|
listMetadata: metadata,
|
|
235
243
|
},
|
|
236
244
|
context: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-content-blog",
|
|
3
|
-
"version": "3.9.2-canary-
|
|
3
|
+
"version": "3.9.2-canary-6443",
|
|
4
4
|
"description": "Blog plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/plugin-content-blog.d.ts",
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
},
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@docusaurus/core": "3.9.2-canary-
|
|
35
|
-
"@docusaurus/logger": "3.9.2-canary-
|
|
36
|
-
"@docusaurus/mdx-loader": "3.9.2-canary-
|
|
37
|
-
"@docusaurus/theme-common": "3.9.2-canary-
|
|
38
|
-
"@docusaurus/types": "3.9.2-canary-
|
|
39
|
-
"@docusaurus/utils": "3.9.2-canary-
|
|
40
|
-
"@docusaurus/utils-common": "3.9.2-canary-
|
|
41
|
-
"@docusaurus/utils-validation": "3.9.2-canary-
|
|
34
|
+
"@docusaurus/core": "3.9.2-canary-6443",
|
|
35
|
+
"@docusaurus/logger": "3.9.2-canary-6443",
|
|
36
|
+
"@docusaurus/mdx-loader": "3.9.2-canary-6443",
|
|
37
|
+
"@docusaurus/theme-common": "3.9.2-canary-6443",
|
|
38
|
+
"@docusaurus/types": "3.9.2-canary-6443",
|
|
39
|
+
"@docusaurus/utils": "3.9.2-canary-6443",
|
|
40
|
+
"@docusaurus/utils-common": "3.9.2-canary-6443",
|
|
41
|
+
"@docusaurus/utils-validation": "3.9.2-canary-6443",
|
|
42
42
|
"cheerio": "1.0.0-rc.12",
|
|
43
43
|
"feed": "^4.2.2",
|
|
44
44
|
"fs-extra": "^11.1.1",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"@total-typescript/shoehorn": "^0.1.2",
|
|
63
63
|
"tree-node-cli": "^1.6.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "a25dde30cfb44b2e621d62c4a58e371e3d9c96bf"
|
|
66
66
|
}
|
package/src/routes.ts
CHANGED
|
@@ -294,12 +294,14 @@ export async function buildAllRoutes({
|
|
|
294
294
|
sidebar: sidebarModulePath,
|
|
295
295
|
},
|
|
296
296
|
props: {
|
|
297
|
-
authors: authors.map((author) =>
|
|
298
|
-
|
|
297
|
+
authors: authors.map((author) => {
|
|
298
|
+
const authorPosts = blogPostsByAuthorKey[author.key] ?? [];
|
|
299
|
+
const listedAuthorPosts = authorPosts.filter(shouldBeListed);
|
|
300
|
+
return toAuthorItemProp({
|
|
299
301
|
author,
|
|
300
|
-
count:
|
|
301
|
-
})
|
|
302
|
-
),
|
|
302
|
+
count: listedAuthorPosts.length,
|
|
303
|
+
});
|
|
304
|
+
}),
|
|
303
305
|
},
|
|
304
306
|
context: {
|
|
305
307
|
blogMetadata: blogMetadataModulePath,
|
|
@@ -309,12 +311,13 @@ export async function buildAllRoutes({
|
|
|
309
311
|
|
|
310
312
|
function createAuthorPaginatedRoute(author: AuthorWithKey): RouteConfig[] {
|
|
311
313
|
const authorBlogPosts = blogPostsByAuthorKey[author.key] ?? [];
|
|
314
|
+
const listedAuthorBlogPosts = authorBlogPosts.filter(shouldBeListed);
|
|
312
315
|
if (!author.page) {
|
|
313
316
|
return [];
|
|
314
317
|
}
|
|
315
318
|
|
|
316
319
|
const pages = paginateBlogPosts({
|
|
317
|
-
blogPosts:
|
|
320
|
+
blogPosts: listedAuthorBlogPosts,
|
|
318
321
|
basePageUrl: author.page.permalink,
|
|
319
322
|
blogDescription,
|
|
320
323
|
blogTitle,
|
|
@@ -332,7 +335,10 @@ export async function buildAllRoutes({
|
|
|
332
335
|
sidebar: sidebarModulePath,
|
|
333
336
|
},
|
|
334
337
|
props: {
|
|
335
|
-
author: toAuthorItemProp({
|
|
338
|
+
author: toAuthorItemProp({
|
|
339
|
+
author,
|
|
340
|
+
count: listedAuthorBlogPosts.length,
|
|
341
|
+
}),
|
|
336
342
|
listMetadata: metadata,
|
|
337
343
|
},
|
|
338
344
|
context: {
|