@docusaurus/plugin-content-blog 0.0.0-5957 → 0.0.0-5962

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 CHANGED
@@ -14,6 +14,7 @@ const lodash_1 = tslib_1.__importDefault(require("lodash"));
14
14
  const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
15
15
  const reading_time_1 = tslib_1.__importDefault(require("reading-time"));
16
16
  const utils_1 = require("@docusaurus/utils");
17
+ const utils_validation_1 = require("@docusaurus/utils-validation");
17
18
  const frontMatter_1 = require("./frontMatter");
18
19
  const authors_1 = require("./authors");
19
20
  function truncate(fileString, truncateMarker) {
@@ -67,9 +68,11 @@ function getBlogTags({ blogPosts, ...params }) {
67
68
  isUnlisted: (item) => item.metadata.unlisted,
68
69
  });
69
70
  return {
71
+ inline: tag.inline,
70
72
  label: tag.label,
71
- items: tagVisibility.listedItems.map((item) => item.id),
72
73
  permalink: tag.permalink,
74
+ description: tag.description,
75
+ items: tagVisibility.listedItems.map((item) => item.id),
73
76
  pages: paginateBlogPosts({
74
77
  blogPosts: tagVisibility.listedItems,
75
78
  basePageUrl: tag.permalink,
@@ -116,7 +119,7 @@ async function parseBlogPostMarkdownFile({ filePath, parseFrontMatter, }) {
116
119
  }
117
120
  }
118
121
  const defaultReadingTime = ({ content, options }) => (0, reading_time_1.default)(content, options).minutes;
119
- async function processBlogSourceFile(blogSourceRelative, contentPaths, context, options, authorsMap) {
122
+ async function processBlogSourceFile(blogSourceRelative, contentPaths, context, options, tagsFile, authorsMap) {
120
123
  const { siteConfig: { baseUrl, markdown: { parseFrontMatter }, }, siteDir, i18n, } = context;
121
124
  const { routeBasePath, tagsBasePath: tagsRouteBasePath, truncateMarker, showReadingTime, editUrl, } = options;
122
125
  // Lookup in localized folder in priority
@@ -190,12 +193,19 @@ async function processBlogSourceFile(blogSourceRelative, contentPaths, context,
190
193
  }
191
194
  return undefined;
192
195
  }
193
- const tagsBasePath = (0, utils_1.normalizeUrl)([
196
+ const tagsBaseRoutePath = (0, utils_1.normalizeUrl)([
194
197
  baseUrl,
195
198
  routeBasePath,
196
199
  tagsRouteBasePath,
197
200
  ]);
198
201
  const authors = (0, authors_1.getBlogPostAuthors)({ authorsMap, frontMatter, baseUrl });
202
+ const tags = (0, utils_1.normalizeTags)({
203
+ options,
204
+ source: blogSourceRelative,
205
+ frontMatterTags: frontMatter.tags,
206
+ tagsBaseRoutePath,
207
+ tagsFile,
208
+ });
199
209
  return {
200
210
  id: slug,
201
211
  metadata: {
@@ -205,7 +215,7 @@ async function processBlogSourceFile(blogSourceRelative, contentPaths, context,
205
215
  title,
206
216
  description,
207
217
  date,
208
- tags: (0, utils_1.normalizeFrontMatterTags)(tagsBasePath, frontMatter.tags),
218
+ tags,
209
219
  readingTime: showReadingTime
210
220
  ? options.readingTime({
211
221
  content,
@@ -236,9 +246,10 @@ async function generateBlogPosts(contentPaths, context, options) {
236
246
  contentPaths,
237
247
  authorsMapPath: options.authorsMapPath,
238
248
  });
249
+ const tagsFile = await (0, utils_validation_1.getTagsFile)({ contentPaths, tags: options.tags });
239
250
  async function doProcessBlogSourceFile(blogSourceFile) {
240
251
  try {
241
- return await processBlogSourceFile(blogSourceFile, contentPaths, context, options, authorsMap);
252
+ return await processBlogSourceFile(blogSourceFile, contentPaths, context, options, tagsFile, authorsMap);
242
253
  }
243
254
  catch (err) {
244
255
  throw new Error(`Processing of blog source file path=${blogSourceFile} failed.`, { cause: err });
package/lib/index.js CHANGED
@@ -11,6 +11,7 @@ const tslib_1 = require("tslib");
11
11
  const path_1 = tslib_1.__importDefault(require("path"));
12
12
  const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
13
13
  const utils_1 = require("@docusaurus/utils");
14
+ const utils_validation_1 = require("@docusaurus/utils-validation");
14
15
  const blogUtils_1 = require("./blogUtils");
15
16
  const footnoteIDFixer_1 = tslib_1.__importDefault(require("./remark/footnoteIDFixer"));
16
17
  const translations_1 = require("./translations");
@@ -49,7 +50,15 @@ async function pluginContentBlog(context, options) {
49
50
  getPathsToWatch() {
50
51
  const { include } = options;
51
52
  const contentMarkdownGlobs = (0, utils_1.getContentPathList)(contentPaths).flatMap((contentPath) => include.map((pattern) => `${contentPath}/${pattern}`));
52
- return [authorsMapFilePath, ...contentMarkdownGlobs].filter(Boolean);
53
+ const tagsFilePaths = (0, utils_validation_1.getTagsFilePathsToWatch)({
54
+ contentPaths,
55
+ tags: options.tags,
56
+ });
57
+ return [
58
+ authorsMapFilePath,
59
+ ...tagsFilePaths,
60
+ ...contentMarkdownGlobs,
61
+ ].filter(Boolean);
53
62
  },
54
63
  getTranslationFiles() {
55
64
  return (0, translations_1.getTranslationFiles)(options);
package/lib/options.js CHANGED
@@ -42,6 +42,8 @@ exports.DEFAULT_OPTIONS = {
42
42
  showLastUpdateTime: false,
43
43
  showLastUpdateAuthor: false,
44
44
  processBlogPosts: async () => undefined,
45
+ onInlineTags: 'warn',
46
+ tags: undefined,
45
47
  };
46
48
  const PluginOptionSchema = utils_validation_1.Joi.object({
47
49
  path: utils_validation_1.Joi.string().default(exports.DEFAULT_OPTIONS.path),
@@ -111,6 +113,13 @@ const PluginOptionSchema = utils_validation_1.Joi.object({
111
113
  processBlogPosts: utils_validation_1.Joi.function()
112
114
  .optional()
113
115
  .default(() => exports.DEFAULT_OPTIONS.processBlogPosts),
116
+ onInlineTags: utils_validation_1.Joi.string()
117
+ .equal('ignore', 'log', 'warn', 'throw')
118
+ .default(exports.DEFAULT_OPTIONS.onInlineTags),
119
+ tags: utils_validation_1.Joi.string()
120
+ .disallow('')
121
+ .allow(null, false)
122
+ .default(() => exports.DEFAULT_OPTIONS.tags),
114
123
  }).default(exports.DEFAULT_OPTIONS);
115
124
  function validateOptions({ validate, options, }) {
116
125
  const validatedOptions = validate(PluginOptionSchema, options);
package/lib/props.js CHANGED
@@ -7,6 +7,7 @@ function toTagsProp({ blogTags }) {
7
7
  .map((tag) => ({
8
8
  label: tag.label,
9
9
  permalink: tag.permalink,
10
+ description: tag.description,
10
11
  count: tag.items.length,
11
12
  }));
12
13
  }
@@ -15,6 +16,7 @@ function toTagProp({ blogTagsListPath, tag, }) {
15
16
  return {
16
17
  label: tag.label,
17
18
  permalink: tag.permalink,
19
+ description: tag.description,
18
20
  allTagsPath: blogTagsListPath,
19
21
  count: tag.items.length,
20
22
  unlisted: tag.unlisted,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-content-blog",
3
- "version": "0.0.0-5957",
3
+ "version": "0.0.0-5962",
4
4
  "description": "Blog plugin for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/plugin-content-blog.d.ts",
@@ -31,13 +31,13 @@
31
31
  },
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
- "@docusaurus/core": "0.0.0-5957",
35
- "@docusaurus/logger": "0.0.0-5957",
36
- "@docusaurus/mdx-loader": "0.0.0-5957",
37
- "@docusaurus/types": "0.0.0-5957",
38
- "@docusaurus/utils": "0.0.0-5957",
39
- "@docusaurus/utils-common": "0.0.0-5957",
40
- "@docusaurus/utils-validation": "0.0.0-5957",
34
+ "@docusaurus/core": "0.0.0-5962",
35
+ "@docusaurus/logger": "0.0.0-5962",
36
+ "@docusaurus/mdx-loader": "0.0.0-5962",
37
+ "@docusaurus/types": "0.0.0-5962",
38
+ "@docusaurus/utils": "0.0.0-5962",
39
+ "@docusaurus/utils-common": "0.0.0-5962",
40
+ "@docusaurus/utils-validation": "0.0.0-5962",
41
41
  "cheerio": "^1.0.0-rc.12",
42
42
  "feed": "^4.2.2",
43
43
  "fs-extra": "^11.1.1",
@@ -59,5 +59,5 @@
59
59
  "devDependencies": {
60
60
  "@total-typescript/shoehorn": "^0.1.2"
61
61
  },
62
- "gitHead": "edb3a453b0b3a853eadfc4e9ec44d47ea76d5002"
62
+ "gitHead": "35386a1d384d8e8757ef9f993b84dd5accc00e97"
63
63
  }
package/src/blogUtils.ts CHANGED
@@ -18,7 +18,6 @@ import {
18
18
  getFolderContainingFile,
19
19
  posixPath,
20
20
  Globby,
21
- normalizeFrontMatterTags,
22
21
  groupTaggedItems,
23
22
  getTagVisibility,
24
23
  getFileCommitDate,
@@ -26,9 +25,12 @@ import {
26
25
  isUnlisted,
27
26
  isDraft,
28
27
  readLastUpdateData,
28
+ normalizeTags,
29
29
  } from '@docusaurus/utils';
30
+ import {getTagsFile} from '@docusaurus/utils-validation';
30
31
  import {validateBlogPostFrontMatter} from './frontMatter';
31
32
  import {type AuthorsMap, getAuthorsMap, getBlogPostAuthors} from './authors';
33
+ import type {TagsFile} from '@docusaurus/utils';
32
34
  import type {LoadContext, ParseFrontMatter} from '@docusaurus/types';
33
35
  import type {
34
36
  PluginOptions,
@@ -125,9 +127,11 @@ export function getBlogTags({
125
127
  isUnlisted: (item) => item.metadata.unlisted,
126
128
  });
127
129
  return {
130
+ inline: tag.inline,
128
131
  label: tag.label,
129
- items: tagVisibility.listedItems.map((item) => item.id),
130
132
  permalink: tag.permalink,
133
+ description: tag.description,
134
+ items: tagVisibility.listedItems.map((item) => item.id),
131
135
  pages: paginateBlogPosts({
132
136
  blogPosts: tagVisibility.listedItems,
133
137
  basePageUrl: tag.permalink,
@@ -197,6 +201,7 @@ async function processBlogSourceFile(
197
201
  contentPaths: BlogContentPaths,
198
202
  context: LoadContext,
199
203
  options: PluginOptions,
204
+ tagsFile: TagsFile | null,
200
205
  authorsMap?: AuthorsMap,
201
206
  ): Promise<BlogPost | undefined> {
202
207
  const {
@@ -315,13 +320,21 @@ async function processBlogSourceFile(
315
320
  return undefined;
316
321
  }
317
322
 
318
- const tagsBasePath = normalizeUrl([
323
+ const tagsBaseRoutePath = normalizeUrl([
319
324
  baseUrl,
320
325
  routeBasePath,
321
326
  tagsRouteBasePath,
322
327
  ]);
323
328
  const authors = getBlogPostAuthors({authorsMap, frontMatter, baseUrl});
324
329
 
330
+ const tags = normalizeTags({
331
+ options,
332
+ source: blogSourceRelative,
333
+ frontMatterTags: frontMatter.tags,
334
+ tagsBaseRoutePath,
335
+ tagsFile,
336
+ });
337
+
325
338
  return {
326
339
  id: slug,
327
340
  metadata: {
@@ -331,7 +344,7 @@ async function processBlogSourceFile(
331
344
  title,
332
345
  description,
333
346
  date,
334
- tags: normalizeFrontMatterTags(tagsBasePath, frontMatter.tags),
347
+ tags,
335
348
  readingTime: showReadingTime
336
349
  ? options.readingTime({
337
350
  content,
@@ -371,6 +384,8 @@ export async function generateBlogPosts(
371
384
  authorsMapPath: options.authorsMapPath,
372
385
  });
373
386
 
387
+ const tagsFile = await getTagsFile({contentPaths, tags: options.tags});
388
+
374
389
  async function doProcessBlogSourceFile(blogSourceFile: string) {
375
390
  try {
376
391
  return await processBlogSourceFile(
@@ -378,6 +393,7 @@ export async function generateBlogPosts(
378
393
  contentPaths,
379
394
  context,
380
395
  options,
396
+ tagsFile,
381
397
  authorsMap,
382
398
  );
383
399
  } catch (err) {
package/src/index.ts CHANGED
@@ -20,6 +20,7 @@ import {
20
20
  DEFAULT_PLUGIN_ID,
21
21
  resolveMarkdownLinkPathname,
22
22
  } from '@docusaurus/utils';
23
+ import {getTagsFilePathsToWatch} from '@docusaurus/utils-validation';
23
24
  import {
24
25
  getSourceToPermalink,
25
26
  getBlogTags,
@@ -104,9 +105,16 @@ export default async function pluginContentBlog(
104
105
  (contentPath) => include.map((pattern) => `${contentPath}/${pattern}`),
105
106
  );
106
107
 
107
- return [authorsMapFilePath, ...contentMarkdownGlobs].filter(
108
- Boolean,
109
- ) as string[];
108
+ const tagsFilePaths = getTagsFilePathsToWatch({
109
+ contentPaths,
110
+ tags: options.tags,
111
+ });
112
+
113
+ return [
114
+ authorsMapFilePath,
115
+ ...tagsFilePaths,
116
+ ...contentMarkdownGlobs,
117
+ ].filter(Boolean) as string[];
110
118
  },
111
119
 
112
120
  getTranslationFiles() {
package/src/options.ts CHANGED
@@ -54,6 +54,8 @@ export const DEFAULT_OPTIONS: PluginOptions = {
54
54
  showLastUpdateTime: false,
55
55
  showLastUpdateAuthor: false,
56
56
  processBlogPosts: async () => undefined,
57
+ onInlineTags: 'warn',
58
+ tags: undefined,
57
59
  };
58
60
 
59
61
  const PluginOptionSchema = Joi.object<PluginOptions>({
@@ -144,6 +146,13 @@ const PluginOptionSchema = Joi.object<PluginOptions>({
144
146
  processBlogPosts: Joi.function()
145
147
  .optional()
146
148
  .default(() => DEFAULT_OPTIONS.processBlogPosts),
149
+ onInlineTags: Joi.string()
150
+ .equal('ignore', 'log', 'warn', 'throw')
151
+ .default(DEFAULT_OPTIONS.onInlineTags),
152
+ tags: Joi.string()
153
+ .disallow('')
154
+ .allow(null, false)
155
+ .default(() => DEFAULT_OPTIONS.tags),
147
156
  }).default(DEFAULT_OPTIONS);
148
157
 
149
158
  export function validateOptions({
@@ -4,7 +4,6 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
-
8
7
  /// <reference types="@docusaurus/module-type-aliases" />
9
8
 
10
9
  declare module '@docusaurus/plugin-content-blog' {
@@ -12,9 +11,10 @@ declare module '@docusaurus/plugin-content-blog' {
12
11
  import type {MDXOptions} from '@docusaurus/mdx-loader';
13
12
  import type {
14
13
  FrontMatterTag,
15
- Tag,
14
+ TagMetadata,
16
15
  LastUpdateData,
17
16
  FrontMatterLastUpdate,
17
+ TagsPluginOptions,
18
18
  } from '@docusaurus/utils';
19
19
  import type {DocusaurusConfig, Plugin, LoadContext} from '@docusaurus/types';
20
20
  import type {Item as FeedItem} from 'feed';
@@ -236,7 +236,7 @@ yarn workspace v1.22.19image` is a collocated image path, this entry will be the
236
236
  /** Front matter, as-is. */
237
237
  readonly frontMatter: BlogPostFrontMatter & {[key: string]: unknown};
238
238
  /** Tags, normalized. */
239
- readonly tags: Tag[];
239
+ readonly tags: TagMetadata[];
240
240
  /**
241
241
  * Marks the post as unlisted and visibly hides it unless directly accessed.
242
242
  */
@@ -345,103 +345,104 @@ yarn workspace v1.22.19image` is a collocated image path, this entry will be the
345
345
  /**
346
346
  * Plugin options after normalization.
347
347
  */
348
- export type PluginOptions = MDXOptions & {
349
- /** Plugin ID. */
350
- id?: string;
351
- /**
352
- * Path to the blog content directory on the file system, relative to site
353
- * directory.
354
- */
355
- path: string;
356
- /**
357
- * URL route for the blog section of your site. **DO NOT** include a
358
- * trailing slash. Use `/` to put the blog at root path.
359
- */
360
- routeBasePath: string;
361
- /**
362
- * URL route for the tags section of your blog. Will be appended to
363
- * `routeBasePath`.
364
- */
365
- tagsBasePath: string;
366
- /**
367
- * URL route for the pages section of your blog. Will be appended to
368
- * `routeBasePath`.
369
- */
370
- pageBasePath: string;
371
- /**
372
- * URL route for the archive section of your blog. Will be appended to
373
- * `routeBasePath`. **DO NOT** include a trailing slash. Use `null` to
374
- * disable generation of archive.
375
- */
376
- archiveBasePath: string | null;
377
- /**
378
- * Array of glob patterns matching Markdown files to be built, relative to
379
- * the content path.
380
- */
381
- include: string[];
382
- /**
383
- * Array of glob patterns matching Markdown files to be excluded. Serves as
384
- * refinement based on the `include` option.
385
- */
386
- exclude: string[];
387
- /**
388
- * Number of posts to show per page in the listing page. Use `'ALL'` to
389
- * display all posts on one listing page.
390
- */
391
- postsPerPage: number | 'ALL';
392
- /** Root component of the blog listing page. */
393
- blogListComponent: string;
394
- /** Root component of each blog post page. */
395
- blogPostComponent: string;
396
- /** Root component of the tags list page. */
397
- blogTagsListComponent: string;
398
- /** Root component of the "posts containing tag" page. */
399
- blogTagsPostsComponent: string;
400
- /** Root component of the blog archive page. */
401
- blogArchiveComponent: string;
402
- /** Blog page title for better SEO. */
403
- blogTitle: string;
404
- /** Blog page meta description for better SEO. */
405
- blogDescription: string;
406
- /**
407
- * Number of blog post elements to show in the blog sidebar. `'ALL'` to show
408
- * all blog posts; `0` to disable.
409
- */
410
- blogSidebarCount: number | 'ALL';
411
- /** Title of the blog sidebar. */
412
- blogSidebarTitle: string;
413
- /** Truncate marker marking where the summary ends. */
414
- truncateMarker: RegExp;
415
- /** Show estimated reading time for the blog post. */
416
- showReadingTime: boolean;
417
- /** Blog feed. */
418
- feedOptions: FeedOptions;
419
- /**
420
- * Base URL to edit your site. The final URL is computed by `editUrl +
421
- * relativePostPath`. Using a function allows more nuanced control for each
422
- * file. Omitting this variable entirely will disable edit links.
423
- */
424
- editUrl?: string | EditUrlFunction;
425
- /**
426
- * The edit URL will target the localized file, instead of the original
427
- * unlocalized file. Ignored when `editUrl` is a function.
428
- */
429
- editLocalizedFiles?: boolean;
430
- /** Path to the authors map file, relative to the blog content directory. */
431
- authorsMapPath: string;
432
- /** A callback to customize the reading time number displayed. */
433
- readingTime: ReadingTimeFunctionOption;
434
- /** Governs the direction of blog post sorting. */
435
- sortPosts: 'ascending' | 'descending';
436
- /** Whether to display the last date the doc was updated. */
437
- showLastUpdateTime: boolean;
438
- /** Whether to display the author who last updated the doc. */
439
- showLastUpdateAuthor: boolean;
440
- /** An optional function which can be used to transform blog posts
441
- * (filter, modify, delete, etc...).
442
- */
443
- processBlogPosts: ProcessBlogPostsFn;
444
- };
348
+ export type PluginOptions = MDXOptions &
349
+ TagsPluginOptions & {
350
+ /** Plugin ID. */
351
+ id?: string;
352
+ /**
353
+ * Path to the blog content directory on the file system, relative to site
354
+ * directory.
355
+ */
356
+ path: string;
357
+ /**
358
+ * URL route for the blog section of your site. **DO NOT** include a
359
+ * trailing slash. Use `/` to put the blog at root path.
360
+ */
361
+ routeBasePath: string;
362
+ /**
363
+ * URL route for the tags section of your blog. Will be appended to
364
+ * `routeBasePath`.
365
+ */
366
+ tagsBasePath: string;
367
+ /**
368
+ * URL route for the pages section of your blog. Will be appended to
369
+ * `routeBasePath`.
370
+ */
371
+ pageBasePath: string;
372
+ /**
373
+ * URL route for the archive section of your blog. Will be appended to
374
+ * `routeBasePath`. **DO NOT** include a trailing slash. Use `null` to
375
+ * disable generation of archive.
376
+ */
377
+ archiveBasePath: string | null;
378
+ /**
379
+ * Array of glob patterns matching Markdown files to be built, relative to
380
+ * the content path.
381
+ */
382
+ include: string[];
383
+ /**
384
+ * Array of glob patterns matching Markdown files to be excluded. Serves as
385
+ * refinement based on the `include` option.
386
+ */
387
+ exclude: string[];
388
+ /**
389
+ * Number of posts to show per page in the listing page. Use `'ALL'` to
390
+ * display all posts on one listing page.
391
+ */
392
+ postsPerPage: number | 'ALL';
393
+ /** Root component of the blog listing page. */
394
+ blogListComponent: string;
395
+ /** Root component of each blog post page. */
396
+ blogPostComponent: string;
397
+ /** Root component of the tags list page. */
398
+ blogTagsListComponent: string;
399
+ /** Root component of the "posts containing tag" page. */
400
+ blogTagsPostsComponent: string;
401
+ /** Root component of the blog archive page. */
402
+ blogArchiveComponent: string;
403
+ /** Blog page title for better SEO. */
404
+ blogTitle: string;
405
+ /** Blog page meta description for better SEO. */
406
+ blogDescription: string;
407
+ /**
408
+ * Number of blog post elements to show in the blog sidebar. `'ALL'` to show
409
+ * all blog posts; `0` to disable.
410
+ */
411
+ blogSidebarCount: number | 'ALL';
412
+ /** Title of the blog sidebar. */
413
+ blogSidebarTitle: string;
414
+ /** Truncate marker marking where the summary ends. */
415
+ truncateMarker: RegExp;
416
+ /** Show estimated reading time for the blog post. */
417
+ showReadingTime: boolean;
418
+ /** Blog feed. */
419
+ feedOptions: FeedOptions;
420
+ /**
421
+ * Base URL to edit your site. The final URL is computed by `editUrl +
422
+ * relativePostPath`. Using a function allows more nuanced control for each
423
+ * file. Omitting this variable entirely will disable edit links.
424
+ */
425
+ editUrl?: string | EditUrlFunction;
426
+ /**
427
+ * The edit URL will target the localized file, instead of the original
428
+ * unlocalized file. Ignored when `editUrl` is a function.
429
+ */
430
+ editLocalizedFiles?: boolean;
431
+ /** Path to the authors map file, relative to the blog content directory. */
432
+ authorsMapPath: string;
433
+ /** A callback to customize the reading time number displayed. */
434
+ readingTime: ReadingTimeFunctionOption;
435
+ /** Governs the direction of blog post sorting. */
436
+ sortPosts: 'ascending' | 'descending';
437
+ /** Whether to display the last date the doc was updated. */
438
+ showLastUpdateTime: boolean;
439
+ /** Whether to display the author who last updated the doc. */
440
+ showLastUpdateAuthor: boolean;
441
+ /** An optional function which can be used to transform blog posts
442
+ * (filter, modify, delete, etc...).
443
+ */
444
+ processBlogPosts: ProcessBlogPostsFn;
445
+ };
445
446
 
446
447
  /**
447
448
  * Feed options, as provided by user config. `type` accepts `all` as shortcut
@@ -494,7 +495,7 @@ yarn workspace v1.22.19image` is a collocated image path, this entry will be the
494
495
  [permalink: string]: BlogTag;
495
496
  };
496
497
 
497
- export type BlogTag = Tag & {
498
+ export type BlogTag = TagMetadata & {
498
499
  /** Blog post permalinks. */
499
500
  items: string[];
500
501
  pages: BlogPaginated[];
package/src/props.ts CHANGED
@@ -13,6 +13,7 @@ export function toTagsProp({blogTags}: {blogTags: BlogTags}): TagsListItem[] {
13
13
  .map((tag) => ({
14
14
  label: tag.label,
15
15
  permalink: tag.permalink,
16
+ description: tag.description,
16
17
  count: tag.items.length,
17
18
  }));
18
19
  }
@@ -27,6 +28,7 @@ export function toTagProp({
27
28
  return {
28
29
  label: tag.label,
29
30
  permalink: tag.permalink,
31
+ description: tag.description,
30
32
  allTagsPath: blogTagsListPath,
31
33
  count: tag.items.length,
32
34
  unlisted: tag.unlisted,