@docusaurus/plugin-content-blog 0.0.0-4350 → 0.0.0-4351

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/authors.d.ts CHANGED
@@ -4,8 +4,8 @@
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
- import { Author, BlogContentPaths } from './types';
8
- import { BlogPostFrontMatter } from './blogFrontMatter';
7
+ import type { Author, BlogContentPaths } from './types';
8
+ import type { BlogPostFrontMatter } from './blogFrontMatter';
9
9
  export declare type AuthorsMap = Record<string, Author>;
10
10
  export declare function validateAuthorsMap(content: unknown): AuthorsMap;
11
11
  export declare function getAuthorsMap(params: {
@@ -4,8 +4,8 @@
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
- import { PluginOptions, BlogPost, BlogContentPaths, BlogMarkdownLoaderOptions, BlogTags } from './types';
8
- import { LoadContext } from '@docusaurus/types';
7
+ import type { PluginOptions, BlogPost, BlogContentPaths, BlogMarkdownLoaderOptions, BlogTags } from './types';
8
+ import type { LoadContext } from '@docusaurus/types';
9
9
  export declare function truncate(fileString: string, truncateMarker: RegExp): string;
10
10
  export declare function getSourceToPermalink(blogPosts: BlogPost[]): Record<string, string>;
11
11
  export declare function getBlogTags(blogPosts: BlogPost[]): BlogTags;
package/lib/feed.d.ts CHANGED
@@ -5,8 +5,8 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import { Feed } from 'feed';
8
- import { PluginOptions, BlogPost } from './types';
9
- import { DocusaurusConfig } from '@docusaurus/types';
8
+ import type { PluginOptions, BlogPost } from './types';
9
+ import type { DocusaurusConfig } from '@docusaurus/types';
10
10
  export declare function generateBlogFeed({ blogPosts, options, siteConfig, }: {
11
11
  blogPosts: BlogPost[];
12
12
  options: PluginOptions;
package/lib/index.d.ts CHANGED
@@ -4,7 +4,7 @@
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
- import { PluginOptions, BlogContent } from './types';
8
- import { LoadContext, Plugin, OptionValidationContext, ValidationResult } from '@docusaurus/types';
7
+ import type { PluginOptions, BlogContent } from './types';
8
+ import type { LoadContext, Plugin, OptionValidationContext, ValidationResult } from '@docusaurus/types';
9
9
  export default function pluginContentBlog(context: LoadContext, options: PluginOptions): Promise<Plugin<BlogContent>>;
10
10
  export declare function validateOptions({ validate, options, }: OptionValidationContext<PluginOptions>): ValidationResult<PluginOptions>;
@@ -4,6 +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
- import { BlogMarkdownLoaderOptions } from './types';
7
+ import type { BlogMarkdownLoaderOptions } from './types';
8
8
  import type { LoaderContext } from 'webpack';
9
9
  export default function markdownLoader(this: LoaderContext<BlogMarkdownLoaderOptions>, source: string): void;
@@ -5,6 +5,6 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import { Joi } from '@docusaurus/utils-validation';
8
- import { PluginOptions } from './types';
8
+ import type { PluginOptions } from './types';
9
9
  export declare const DEFAULT_OPTIONS: PluginOptions;
10
10
  export declare const PluginOptionSchema: Joi.ObjectSchema<PluginOptions>;
package/lib/types.d.ts CHANGED
@@ -7,8 +7,8 @@
7
7
  import type { RemarkAndRehypePluginOptions } from '@docusaurus/mdx-loader';
8
8
  import type { Tag } from '@docusaurus/utils';
9
9
  import type { BrokenMarkdownLink, ContentPaths } from '@docusaurus/utils/lib/markdownLinks';
10
- import { Overwrite } from 'utility-types';
11
- import { BlogPostFrontMatter } from './blogFrontMatter';
10
+ import type { Overwrite } from 'utility-types';
11
+ import type { BlogPostFrontMatter } from './blogFrontMatter';
12
12
  export declare type BlogContentPaths = ContentPaths;
13
13
  export interface BlogContent {
14
14
  blogSidebarTitle: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-content-blog",
3
- "version": "0.0.0-4350",
3
+ "version": "0.0.0-4351",
4
4
  "description": "Blog plugin for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/plugin-content-blog.d.ts",
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
- "@docusaurus/core": "0.0.0-4350",
22
- "@docusaurus/logger": "0.0.0-4350",
23
- "@docusaurus/mdx-loader": "0.0.0-4350",
24
- "@docusaurus/utils": "0.0.0-4350",
25
- "@docusaurus/utils-validation": "0.0.0-4350",
21
+ "@docusaurus/core": "0.0.0-4351",
22
+ "@docusaurus/logger": "0.0.0-4351",
23
+ "@docusaurus/mdx-loader": "0.0.0-4351",
24
+ "@docusaurus/utils": "0.0.0-4351",
25
+ "@docusaurus/utils-validation": "0.0.0-4351",
26
26
  "escape-string-regexp": "^4.0.0",
27
27
  "feed": "^4.2.2",
28
28
  "fs-extra": "^10.0.0",
@@ -36,7 +36,7 @@
36
36
  "webpack": "^5.61.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@docusaurus/types": "0.0.0-4350"
39
+ "@docusaurus/types": "0.0.0-4351"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "react": "^16.8.4 || ^17.0.0",
@@ -45,5 +45,5 @@
45
45
  "engines": {
46
46
  "node": ">=14"
47
47
  },
48
- "gitHead": "395433a6f915dd0e6d73223228968fdc58761fd0"
48
+ "gitHead": "6633ee41d0b5c670e9e4c18fb6ddd9c8bb05a41b"
49
49
  }
package/src/authors.ts CHANGED
@@ -5,10 +5,10 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import {Author, BlogContentPaths} from './types';
8
+ import type {Author, BlogContentPaths} from './types';
9
9
  import {getDataFileData} from '@docusaurus/utils';
10
10
  import {Joi, URISchema} from '@docusaurus/utils-validation';
11
- import {
11
+ import type {
12
12
  BlogPostFrontMatter,
13
13
  BlogPostFrontMatterAuthor,
14
14
  BlogPostFrontMatterAuthors,
package/src/blogUtils.ts CHANGED
@@ -9,7 +9,7 @@ import fs from 'fs-extra';
9
9
  import path from 'path';
10
10
  import readingTime from 'reading-time';
11
11
  import {keyBy, mapValues} from 'lodash';
12
- import {
12
+ import type {
13
13
  PluginOptions,
14
14
  BlogPost,
15
15
  BlogContentPaths,
@@ -30,9 +30,9 @@ import {
30
30
  groupTaggedItems,
31
31
  getContentPathList,
32
32
  } from '@docusaurus/utils';
33
- import {LoadContext} from '@docusaurus/types';
33
+ import type {LoadContext} from '@docusaurus/types';
34
34
  import {validateBlogPostFrontMatter} from './blogFrontMatter';
35
- import {AuthorsMap, getAuthorsMap, getBlogPostAuthors} from './authors';
35
+ import {type AuthorsMap, getAuthorsMap, getBlogPostAuthors} from './authors';
36
36
  import logger from '@docusaurus/logger';
37
37
 
38
38
  export function truncate(fileString: string, truncateMarker: RegExp): string {
package/src/feed.ts CHANGED
@@ -5,10 +5,10 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import {Feed, Author as FeedAuthor, Item as FeedItem} from 'feed';
9
- import {PluginOptions, Author, BlogPost, FeedType} from './types';
8
+ import {Feed, type Author as FeedAuthor, type Item as FeedItem} from 'feed';
9
+ import type {PluginOptions, Author, BlogPost, FeedType} from './types';
10
10
  import {normalizeUrl, mdxToHtml} from '@docusaurus/utils';
11
- import {DocusaurusConfig} from '@docusaurus/types';
11
+ import type {DocusaurusConfig} from '@docusaurus/types';
12
12
  import path from 'path';
13
13
  import fs from 'fs-extra';
14
14
 
package/src/index.ts CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  } from '@docusaurus/utils';
23
23
  import {translateContent, getTranslationFiles} from './translations';
24
24
 
25
- import {
25
+ import type {
26
26
  PluginOptions,
27
27
  BlogTags,
28
28
  BlogContent,
@@ -35,7 +35,7 @@ import {
35
35
  Assets,
36
36
  } from './types';
37
37
  import {PluginOptionSchema} from './pluginOptionSchema';
38
- import {
38
+ import type {
39
39
  LoadContext,
40
40
  ConfigureWebpackUtils,
41
41
  Props,
@@ -44,13 +44,13 @@ import {
44
44
  OptionValidationContext,
45
45
  ValidationResult,
46
46
  } from '@docusaurus/types';
47
- import {Configuration} from 'webpack';
47
+ import type {Configuration} from 'webpack';
48
48
  import {
49
49
  generateBlogPosts,
50
50
  getSourceToPermalink,
51
51
  getBlogTags,
52
52
  } from './blogUtils';
53
- import {BlogPostFrontMatter} from './blogFrontMatter';
53
+ import type {BlogPostFrontMatter} from './blogFrontMatter';
54
54
  import {createBlogFeedFiles} from './feed';
55
55
 
56
56
  export default async function pluginContentBlog(
@@ -7,7 +7,7 @@
7
7
 
8
8
  import {truncate, linkify} from './blogUtils';
9
9
  import {parseQuery} from 'loader-utils';
10
- import {BlogMarkdownLoaderOptions} from './types';
10
+ import type {BlogMarkdownLoaderOptions} from './types';
11
11
  import type {LoaderContext} from 'webpack';
12
12
 
13
13
  export default function markdownLoader(
@@ -13,7 +13,7 @@ import {
13
13
  URISchema,
14
14
  } from '@docusaurus/utils-validation';
15
15
  import {GlobExcludeDefault} from '@docusaurus/utils';
16
- import {PluginOptions} from './types';
16
+ import type {PluginOptions} from './types';
17
17
 
18
18
  export const DEFAULT_OPTIONS: PluginOptions = {
19
19
  feedOptions: {type: ['rss', 'atom'], copyright: ''},
package/src/types.ts CHANGED
@@ -11,8 +11,8 @@ import type {
11
11
  BrokenMarkdownLink,
12
12
  ContentPaths,
13
13
  } from '@docusaurus/utils/lib/markdownLinks';
14
- import {Overwrite} from 'utility-types';
15
- import {BlogPostFrontMatter} from './blogFrontMatter';
14
+ import type {Overwrite} from 'utility-types';
15
+ import type {BlogPostFrontMatter} from './blogFrontMatter';
16
16
 
17
17
  export type BlogContentPaths = ContentPaths;
18
18