@docusaurus/plugin-content-blog 0.0.0-4837 → 0.0.0-4838
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/blogUtils.js +1 -1
- package/lib/index.js +32 -31
- package/lib/types.d.ts +4 -5
- package/package.json +9 -9
- package/src/blogUtils.ts +1 -1
- package/src/index.ts +46 -46
- package/src/plugin-content-blog.d.ts +9 -17
- package/src/types.ts +4 -9
package/lib/blogUtils.js
CHANGED
|
@@ -58,7 +58,7 @@ exports.paginateBlogPosts = paginateBlogPosts;
|
|
|
58
58
|
function getBlogTags({ blogPosts, ...params }) {
|
|
59
59
|
const groups = (0, utils_1.groupTaggedItems)(blogPosts, (blogPost) => blogPost.metadata.tags);
|
|
60
60
|
return lodash_1.default.mapValues(groups, ({ tag, items: tagBlogPosts }) => ({
|
|
61
|
-
|
|
61
|
+
label: tag.label,
|
|
62
62
|
items: tagBlogPosts.map((item) => item.id),
|
|
63
63
|
permalink: tag.permalink,
|
|
64
64
|
pages: paginateBlogPosts({
|
package/lib/index.js
CHANGED
|
@@ -52,6 +52,8 @@ async function pluginContentBlog(context, options) {
|
|
|
52
52
|
// Fetches blog contents and returns metadata for the necessary routes.
|
|
53
53
|
async loadContent() {
|
|
54
54
|
const { postsPerPage: postsPerPageOption, routeBasePath, tagsBasePath, blogDescription, blogTitle, blogSidebarTitle, } = options;
|
|
55
|
+
const baseBlogUrl = (0, utils_1.normalizeUrl)([baseUrl, routeBasePath]);
|
|
56
|
+
const blogTagsListPath = (0, utils_1.normalizeUrl)([baseBlogUrl, tagsBasePath]);
|
|
55
57
|
const blogPosts = await (0, blogUtils_1.generateBlogPosts)(contentPaths, context, options);
|
|
56
58
|
if (!blogPosts.length) {
|
|
57
59
|
return {
|
|
@@ -59,7 +61,7 @@ async function pluginContentBlog(context, options) {
|
|
|
59
61
|
blogPosts: [],
|
|
60
62
|
blogListPaginated: [],
|
|
61
63
|
blogTags: {},
|
|
62
|
-
blogTagsListPath
|
|
64
|
+
blogTagsListPath,
|
|
63
65
|
blogTagsPaginated: [],
|
|
64
66
|
};
|
|
65
67
|
}
|
|
@@ -80,7 +82,6 @@ async function pluginContentBlog(context, options) {
|
|
|
80
82
|
};
|
|
81
83
|
}
|
|
82
84
|
});
|
|
83
|
-
const baseBlogUrl = (0, utils_1.normalizeUrl)([baseUrl, routeBasePath]);
|
|
84
85
|
const blogListPaginated = (0, blogUtils_1.paginateBlogPosts)({
|
|
85
86
|
blogPosts,
|
|
86
87
|
blogTitle,
|
|
@@ -94,8 +95,6 @@ async function pluginContentBlog(context, options) {
|
|
|
94
95
|
blogDescription,
|
|
95
96
|
blogTitle,
|
|
96
97
|
});
|
|
97
|
-
const tagsPath = (0, utils_1.normalizeUrl)([baseBlogUrl, tagsBasePath]);
|
|
98
|
-
const blogTagsListPath = Object.keys(blogTags).length > 0 ? tagsPath : null;
|
|
99
98
|
return {
|
|
100
99
|
blogSidebarTitle,
|
|
101
100
|
blogPosts,
|
|
@@ -185,23 +184,37 @@ async function pluginContentBlog(context, options) {
|
|
|
185
184
|
},
|
|
186
185
|
});
|
|
187
186
|
}));
|
|
188
|
-
// Tags.
|
|
189
|
-
if (
|
|
187
|
+
// Tags. This is the last part so we early-return if there are no tags.
|
|
188
|
+
if (Object.keys(blogTags).length === 0) {
|
|
190
189
|
return;
|
|
191
190
|
}
|
|
192
|
-
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
name: tag.name,
|
|
196
|
-
count: tag.items.length,
|
|
191
|
+
async function createTagsListPage() {
|
|
192
|
+
const tagsProp = Object.values(blogTags).map((tag) => ({
|
|
193
|
+
label: tag.label,
|
|
197
194
|
permalink: tag.permalink,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
195
|
+
count: tag.items.length,
|
|
196
|
+
}));
|
|
197
|
+
const tagsPropPath = await createData(`${(0, utils_1.docuHash)(`${blogTagsListPath}-tags`)}.json`, JSON.stringify(tagsProp, null, 2));
|
|
198
|
+
addRoute({
|
|
199
|
+
path: blogTagsListPath,
|
|
200
|
+
component: blogTagsListComponent,
|
|
201
|
+
exact: true,
|
|
202
|
+
modules: {
|
|
203
|
+
sidebar: aliasedSource(sidebarProp),
|
|
204
|
+
tags: aliasedSource(tagsPropPath),
|
|
205
|
+
},
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
async function createTagPostsListPage(tag) {
|
|
202
209
|
await Promise.all(tag.pages.map(async (blogPaginated) => {
|
|
203
210
|
const { metadata, items } = blogPaginated;
|
|
204
|
-
const
|
|
211
|
+
const tagProp = {
|
|
212
|
+
label: tag.label,
|
|
213
|
+
permalink: tag.permalink,
|
|
214
|
+
allTagsPath: blogTagsListPath,
|
|
215
|
+
count: tag.items.length,
|
|
216
|
+
};
|
|
217
|
+
const tagPropPath = await createData(`${(0, utils_1.docuHash)(metadata.permalink)}.json`, JSON.stringify(tagProp, null, 2));
|
|
205
218
|
const listMetadataPath = await createData(`${(0, utils_1.docuHash)(metadata.permalink)}-list.json`, JSON.stringify(metadata, null, 2));
|
|
206
219
|
addRoute({
|
|
207
220
|
path: metadata.permalink,
|
|
@@ -221,26 +234,14 @@ async function pluginContentBlog(context, options) {
|
|
|
221
234
|
},
|
|
222
235
|
};
|
|
223
236
|
}),
|
|
224
|
-
|
|
237
|
+
tag: aliasedSource(tagPropPath),
|
|
225
238
|
listMetadata: aliasedSource(listMetadataPath),
|
|
226
239
|
},
|
|
227
240
|
});
|
|
228
241
|
}));
|
|
229
242
|
}
|
|
230
|
-
await
|
|
231
|
-
|
|
232
|
-
if (Object.keys(blogTags).length > 0) {
|
|
233
|
-
const tagsListPath = await createData(`${(0, utils_1.docuHash)(`${blogTagsListPath}-tags`)}.json`, JSON.stringify(tagsModule, null, 2));
|
|
234
|
-
addRoute({
|
|
235
|
-
path: blogTagsListPath,
|
|
236
|
-
component: blogTagsListComponent,
|
|
237
|
-
exact: true,
|
|
238
|
-
modules: {
|
|
239
|
-
sidebar: aliasedSource(sidebarProp),
|
|
240
|
-
tags: aliasedSource(tagsListPath),
|
|
241
|
-
},
|
|
242
|
-
});
|
|
243
|
-
}
|
|
243
|
+
await createTagsListPage();
|
|
244
|
+
await Promise.all(Object.values(blogTags).map(createTagPostsListPage));
|
|
244
245
|
},
|
|
245
246
|
translateContent({ content, translationFiles }) {
|
|
246
247
|
return (0, translations_1.translateContent)(content, translationFiles);
|
package/lib/types.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import type { BrokenMarkdownLink, ContentPaths } from '@docusaurus/utils';
|
|
8
|
+
import type { Tag } from '@docusaurus/types';
|
|
8
9
|
import type { BlogPostMetadata } from '@docusaurus/plugin-content-blog';
|
|
9
10
|
import type { Metadata as BlogPaginatedMetadata } from '@theme/BlogListPage';
|
|
10
11
|
export declare type BlogContentPaths = ContentPaths;
|
|
@@ -13,16 +14,14 @@ export declare type BlogContent = {
|
|
|
13
14
|
blogPosts: BlogPost[];
|
|
14
15
|
blogListPaginated: BlogPaginated[];
|
|
15
16
|
blogTags: BlogTags;
|
|
16
|
-
blogTagsListPath: string
|
|
17
|
+
blogTagsListPath: string;
|
|
17
18
|
};
|
|
18
19
|
export declare type BlogTags = {
|
|
19
|
-
[
|
|
20
|
+
[permalink: string]: BlogTag;
|
|
20
21
|
};
|
|
21
|
-
export declare type BlogTag = {
|
|
22
|
-
name: string;
|
|
22
|
+
export declare type BlogTag = Tag & {
|
|
23
23
|
/** Blog post permalinks. */
|
|
24
24
|
items: string[];
|
|
25
|
-
permalink: string;
|
|
26
25
|
pages: BlogPaginated[];
|
|
27
26
|
};
|
|
28
27
|
export declare type BlogPost = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-content-blog",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4838",
|
|
4
4
|
"description": "Blog plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/plugin-content-blog.d.ts",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/core": "0.0.0-
|
|
22
|
-
"@docusaurus/logger": "0.0.0-
|
|
23
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
24
|
-
"@docusaurus/utils": "0.0.0-
|
|
25
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
26
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
21
|
+
"@docusaurus/core": "0.0.0-4838",
|
|
22
|
+
"@docusaurus/logger": "0.0.0-4838",
|
|
23
|
+
"@docusaurus/mdx-loader": "0.0.0-4838",
|
|
24
|
+
"@docusaurus/utils": "0.0.0-4838",
|
|
25
|
+
"@docusaurus/utils-common": "0.0.0-4838",
|
|
26
|
+
"@docusaurus/utils-validation": "0.0.0-4838",
|
|
27
27
|
"cheerio": "^1.0.0-rc.10",
|
|
28
28
|
"feed": "^4.2.2",
|
|
29
29
|
"fs-extra": "^10.0.1",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"webpack": "^5.70.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@docusaurus/types": "0.0.0-
|
|
38
|
+
"@docusaurus/types": "0.0.0-4838",
|
|
39
39
|
"escape-string-regexp": "^4.0.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=14"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "e9b56f063a75e637632bdede9cc507bece7c06f1"
|
|
49
49
|
}
|
package/src/blogUtils.ts
CHANGED
|
@@ -114,7 +114,7 @@ export function getBlogTags({
|
|
|
114
114
|
);
|
|
115
115
|
|
|
116
116
|
return _.mapValues(groups, ({tag, items: tagBlogPosts}) => ({
|
|
117
|
-
|
|
117
|
+
label: tag.label,
|
|
118
118
|
items: tagBlogPosts.map((item) => item.id),
|
|
119
119
|
permalink: tag.permalink,
|
|
120
120
|
pages: paginateBlogPosts({
|
package/src/index.ts
CHANGED
|
@@ -30,7 +30,13 @@ import type {
|
|
|
30
30
|
BlogContentPaths,
|
|
31
31
|
BlogMarkdownLoaderOptions,
|
|
32
32
|
} from './types';
|
|
33
|
-
import type {
|
|
33
|
+
import type {
|
|
34
|
+
LoadContext,
|
|
35
|
+
Plugin,
|
|
36
|
+
HtmlTags,
|
|
37
|
+
TagsListItem,
|
|
38
|
+
TagModule,
|
|
39
|
+
} from '@docusaurus/types';
|
|
34
40
|
import {
|
|
35
41
|
generateBlogPosts,
|
|
36
42
|
getSourceToPermalink,
|
|
@@ -43,7 +49,6 @@ import type {
|
|
|
43
49
|
BlogPostFrontMatter,
|
|
44
50
|
BlogPostMetadata,
|
|
45
51
|
Assets,
|
|
46
|
-
TagModule,
|
|
47
52
|
} from '@docusaurus/plugin-content-blog';
|
|
48
53
|
|
|
49
54
|
export default async function pluginContentBlog(
|
|
@@ -117,6 +122,8 @@ export default async function pluginContentBlog(
|
|
|
117
122
|
blogSidebarTitle,
|
|
118
123
|
} = options;
|
|
119
124
|
|
|
125
|
+
const baseBlogUrl = normalizeUrl([baseUrl, routeBasePath]);
|
|
126
|
+
const blogTagsListPath = normalizeUrl([baseBlogUrl, tagsBasePath]);
|
|
120
127
|
const blogPosts = await generateBlogPosts(contentPaths, context, options);
|
|
121
128
|
|
|
122
129
|
if (!blogPosts.length) {
|
|
@@ -125,7 +132,7 @@ export default async function pluginContentBlog(
|
|
|
125
132
|
blogPosts: [],
|
|
126
133
|
blogListPaginated: [],
|
|
127
134
|
blogTags: {},
|
|
128
|
-
blogTagsListPath
|
|
135
|
+
blogTagsListPath,
|
|
129
136
|
blogTagsPaginated: [],
|
|
130
137
|
};
|
|
131
138
|
}
|
|
@@ -150,8 +157,6 @@ export default async function pluginContentBlog(
|
|
|
150
157
|
}
|
|
151
158
|
});
|
|
152
159
|
|
|
153
|
-
const baseBlogUrl = normalizeUrl([baseUrl, routeBasePath]);
|
|
154
|
-
|
|
155
160
|
const blogListPaginated: BlogPaginated[] = paginateBlogPosts({
|
|
156
161
|
blogPosts,
|
|
157
162
|
blogTitle,
|
|
@@ -167,11 +172,6 @@ export default async function pluginContentBlog(
|
|
|
167
172
|
blogTitle,
|
|
168
173
|
});
|
|
169
174
|
|
|
170
|
-
const tagsPath = normalizeUrl([baseBlogUrl, tagsBasePath]);
|
|
171
|
-
|
|
172
|
-
const blogTagsListPath =
|
|
173
|
-
Object.keys(blogTags).length > 0 ? tagsPath : null;
|
|
174
|
-
|
|
175
175
|
return {
|
|
176
176
|
blogSidebarTitle,
|
|
177
177
|
blogPosts,
|
|
@@ -307,30 +307,47 @@ export default async function pluginContentBlog(
|
|
|
307
307
|
}),
|
|
308
308
|
);
|
|
309
309
|
|
|
310
|
-
// Tags.
|
|
311
|
-
if (
|
|
310
|
+
// Tags. This is the last part so we early-return if there are no tags.
|
|
311
|
+
if (Object.keys(blogTags).length === 0) {
|
|
312
312
|
return;
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
-
|
|
316
|
-
Object.
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
permalink: tag.permalink,
|
|
322
|
-
};
|
|
323
|
-
return [tag.name, tagModule];
|
|
324
|
-
}),
|
|
325
|
-
);
|
|
315
|
+
async function createTagsListPage() {
|
|
316
|
+
const tagsProp: TagsListItem[] = Object.values(blogTags).map((tag) => ({
|
|
317
|
+
label: tag.label,
|
|
318
|
+
permalink: tag.permalink,
|
|
319
|
+
count: tag.items.length,
|
|
320
|
+
}));
|
|
326
321
|
|
|
327
|
-
|
|
322
|
+
const tagsPropPath = await createData(
|
|
323
|
+
`${docuHash(`${blogTagsListPath}-tags`)}.json`,
|
|
324
|
+
JSON.stringify(tagsProp, null, 2),
|
|
325
|
+
);
|
|
326
|
+
|
|
327
|
+
addRoute({
|
|
328
|
+
path: blogTagsListPath,
|
|
329
|
+
component: blogTagsListComponent,
|
|
330
|
+
exact: true,
|
|
331
|
+
modules: {
|
|
332
|
+
sidebar: aliasedSource(sidebarProp),
|
|
333
|
+
tags: aliasedSource(tagsPropPath),
|
|
334
|
+
},
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
async function createTagPostsListPage(tag: BlogTag): Promise<void> {
|
|
328
339
|
await Promise.all(
|
|
329
340
|
tag.pages.map(async (blogPaginated) => {
|
|
330
341
|
const {metadata, items} = blogPaginated;
|
|
331
|
-
const
|
|
342
|
+
const tagProp: TagModule = {
|
|
343
|
+
label: tag.label,
|
|
344
|
+
permalink: tag.permalink,
|
|
345
|
+
allTagsPath: blogTagsListPath,
|
|
346
|
+
count: tag.items.length,
|
|
347
|
+
};
|
|
348
|
+
const tagPropPath = await createData(
|
|
332
349
|
`${docuHash(metadata.permalink)}.json`,
|
|
333
|
-
JSON.stringify(
|
|
350
|
+
JSON.stringify(tagProp, null, 2),
|
|
334
351
|
);
|
|
335
352
|
|
|
336
353
|
const listMetadataPath = await createData(
|
|
@@ -356,7 +373,7 @@ export default async function pluginContentBlog(
|
|
|
356
373
|
},
|
|
357
374
|
};
|
|
358
375
|
}),
|
|
359
|
-
|
|
376
|
+
tag: aliasedSource(tagPropPath),
|
|
360
377
|
listMetadata: aliasedSource(listMetadataPath),
|
|
361
378
|
},
|
|
362
379
|
});
|
|
@@ -364,25 +381,8 @@ export default async function pluginContentBlog(
|
|
|
364
381
|
);
|
|
365
382
|
}
|
|
366
383
|
|
|
367
|
-
await
|
|
368
|
-
|
|
369
|
-
// Only create /tags page if there are tags.
|
|
370
|
-
if (Object.keys(blogTags).length > 0) {
|
|
371
|
-
const tagsListPath = await createData(
|
|
372
|
-
`${docuHash(`${blogTagsListPath}-tags`)}.json`,
|
|
373
|
-
JSON.stringify(tagsModule, null, 2),
|
|
374
|
-
);
|
|
375
|
-
|
|
376
|
-
addRoute({
|
|
377
|
-
path: blogTagsListPath,
|
|
378
|
-
component: blogTagsListComponent,
|
|
379
|
-
exact: true,
|
|
380
|
-
modules: {
|
|
381
|
-
sidebar: aliasedSource(sidebarProp),
|
|
382
|
-
tags: aliasedSource(tagsListPath),
|
|
383
|
-
},
|
|
384
|
-
});
|
|
385
|
-
}
|
|
384
|
+
await createTagsListPage();
|
|
385
|
+
await Promise.all(Object.values(blogTags).map(createTagPostsListPage));
|
|
386
386
|
},
|
|
387
387
|
|
|
388
388
|
translateContent({content, translationFiles}) {
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
declare module '@docusaurus/plugin-content-blog' {
|
|
9
9
|
import type {MDXOptions} from '@docusaurus/mdx-loader';
|
|
10
|
-
import type {FrontMatterTag
|
|
10
|
+
import type {FrontMatterTag} from '@docusaurus/utils';
|
|
11
11
|
import type {Overwrite} from 'utility-types';
|
|
12
|
+
import type {Tag} from '@docusaurus/types';
|
|
12
13
|
|
|
13
14
|
export type Assets = {
|
|
14
15
|
/**
|
|
@@ -406,17 +407,6 @@ declare module '@docusaurus/plugin-content-blog' {
|
|
|
406
407
|
}
|
|
407
408
|
>;
|
|
408
409
|
|
|
409
|
-
export type TagModule = {
|
|
410
|
-
/** Permalink of the tag's own page. */
|
|
411
|
-
permalink: string;
|
|
412
|
-
/** Name of the tag. */
|
|
413
|
-
name: string;
|
|
414
|
-
/** Number of posts with this tag. */
|
|
415
|
-
count: number;
|
|
416
|
-
/** The tags list page. */
|
|
417
|
-
allTagsPath: string;
|
|
418
|
-
};
|
|
419
|
-
|
|
420
410
|
export type BlogSidebar = {
|
|
421
411
|
title: string;
|
|
422
412
|
items: {title: string; permalink: string}[];
|
|
@@ -511,28 +501,30 @@ declare module '@theme/BlogListPage' {
|
|
|
511
501
|
}
|
|
512
502
|
|
|
513
503
|
declare module '@theme/BlogTagsListPage' {
|
|
514
|
-
import type {BlogSidebar
|
|
504
|
+
import type {BlogSidebar} from '@docusaurus/plugin-content-blog';
|
|
505
|
+
import type {TagsListItem} from '@docusaurus/types';
|
|
515
506
|
|
|
516
507
|
export interface Props {
|
|
517
508
|
/** Blog sidebar. */
|
|
518
509
|
readonly sidebar: BlogSidebar;
|
|
519
|
-
/**
|
|
520
|
-
readonly tags:
|
|
510
|
+
/** All tags declared in this blog. */
|
|
511
|
+
readonly tags: TagsListItem[];
|
|
521
512
|
}
|
|
522
513
|
|
|
523
514
|
export default function BlogTagsListPage(props: Props): JSX.Element;
|
|
524
515
|
}
|
|
525
516
|
|
|
526
517
|
declare module '@theme/BlogTagsPostsPage' {
|
|
527
|
-
import type {BlogSidebar
|
|
518
|
+
import type {BlogSidebar} from '@docusaurus/plugin-content-blog';
|
|
528
519
|
import type {Content} from '@theme/BlogPostPage';
|
|
529
520
|
import type {Metadata} from '@theme/BlogListPage';
|
|
521
|
+
import type {TagModule} from '@docusaurus/types';
|
|
530
522
|
|
|
531
523
|
export interface Props {
|
|
532
524
|
/** Blog sidebar. */
|
|
533
525
|
readonly sidebar: BlogSidebar;
|
|
534
526
|
/** Metadata of this tag. */
|
|
535
|
-
readonly
|
|
527
|
+
readonly tag: TagModule;
|
|
536
528
|
/** Looks exactly the same as the posts list page */
|
|
537
529
|
readonly listMetadata: Metadata;
|
|
538
530
|
/**
|
package/src/types.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import type {BrokenMarkdownLink, ContentPaths} from '@docusaurus/utils';
|
|
9
|
+
import type {Tag} from '@docusaurus/types';
|
|
9
10
|
import type {BlogPostMetadata} from '@docusaurus/plugin-content-blog';
|
|
10
11
|
import type {Metadata as BlogPaginatedMetadata} from '@theme/BlogListPage';
|
|
11
12
|
|
|
@@ -16,22 +17,16 @@ export type BlogContent = {
|
|
|
16
17
|
blogPosts: BlogPost[];
|
|
17
18
|
blogListPaginated: BlogPaginated[];
|
|
18
19
|
blogTags: BlogTags;
|
|
19
|
-
blogTagsListPath: string
|
|
20
|
+
blogTagsListPath: string;
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
export type BlogTags = {
|
|
23
|
-
|
|
24
|
-
// This is due to legacy frontmatter: tags:
|
|
25
|
-
// [{label: "xyz", permalink: "/1"}, {label: "xyz", permalink: "/2"}]
|
|
26
|
-
// Soon we should forbid declaring permalink through frontmatter
|
|
27
|
-
[tagKey: string]: BlogTag;
|
|
24
|
+
[permalink: string]: BlogTag;
|
|
28
25
|
};
|
|
29
26
|
|
|
30
|
-
export type BlogTag = {
|
|
31
|
-
name: string;
|
|
27
|
+
export type BlogTag = Tag & {
|
|
32
28
|
/** Blog post permalinks. */
|
|
33
29
|
items: string[];
|
|
34
|
-
permalink: string;
|
|
35
30
|
pages: BlogPaginated[];
|
|
36
31
|
};
|
|
37
32
|
|