@docusaurus/plugin-content-blog 2.0.0-beta.17 → 2.0.0-beta.18

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/src/types.ts CHANGED
@@ -5,15 +5,9 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import type {Tag} from '@docusaurus/utils';
9
- import type {
10
- BrokenMarkdownLink,
11
- ContentPaths,
12
- } from '@docusaurus/utils/lib/markdownLinks';
13
- import type {
14
- BlogPostFrontMatter,
15
- Author,
16
- } from '@docusaurus/plugin-content-blog';
8
+ import type {BrokenMarkdownLink, ContentPaths} from '@docusaurus/utils';
9
+ import type {BlogPostMetadata} from '@docusaurus/plugin-content-blog';
10
+ import type {Metadata as BlogPaginatedMetadata} from '@theme/BlogListPage';
17
11
 
18
12
  export type BlogContentPaths = ContentPaths;
19
13
 
@@ -42,70 +36,20 @@ export interface BlogTag {
42
36
 
43
37
  export interface BlogPost {
44
38
  id: string;
45
- metadata: MetaData;
39
+ metadata: BlogPostMetadata;
46
40
  content: string;
47
41
  }
48
42
 
49
- export interface BlogPaginatedMetadata {
50
- permalink: string;
51
- page: number;
52
- postsPerPage: number;
53
- totalPages: number;
54
- totalCount: number;
55
- previousPage: string | null;
56
- nextPage: string | null;
57
- blogTitle: string;
58
- blogDescription: string;
59
- }
60
-
61
43
  export interface BlogPaginated {
62
44
  metadata: BlogPaginatedMetadata;
63
45
  items: string[]; // blog post permalinks
64
46
  }
65
47
 
66
- export interface MetaData {
67
- permalink: string;
68
- source: string;
69
- description: string;
70
- date: Date;
71
- formattedDate: string;
72
- tags: Tag[];
73
- title: string;
74
- readingTime?: number;
75
- prevItem?: Paginator;
76
- nextItem?: Paginator;
77
- truncated: boolean;
78
- editUrl?: string;
79
- authors: Author[];
80
- frontMatter: BlogPostFrontMatter & Record<string, unknown>;
81
- }
82
-
83
- export interface Paginator {
84
- title: string;
85
- permalink: string;
86
- }
87
-
88
- export interface BlogItemsToMetadata {
89
- [key: string]: MetaData;
90
- }
91
-
92
- export interface TagsModule {
93
- [key: string]: TagModule;
94
- }
95
-
96
- export interface TagModule {
97
- allTagsPath: string;
98
- slug: string;
99
- name: string;
100
- count: number;
101
- permalink: string;
102
- }
103
-
104
48
  export type BlogBrokenMarkdownLink = BrokenMarkdownLink<BlogContentPaths>;
105
49
  export type BlogMarkdownLoaderOptions = {
106
50
  siteDir: string;
107
51
  contentPaths: BlogContentPaths;
108
52
  truncateMarker: RegExp;
109
- sourceToPermalink: Record<string, string>;
53
+ sourceToPermalink: {[aliasedPath: string]: string};
110
54
  onBrokenMarkdownLink: (brokenMarkdownLink: BlogBrokenMarkdownLink) => void;
111
55
  };
@@ -1,10 +0,0 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
- import { Joi } from '@docusaurus/utils-validation';
8
- import type { PluginOptions } from '@docusaurus/plugin-content-blog';
9
- export declare const DEFAULT_OPTIONS: PluginOptions;
10
- export declare const PluginOptionSchema: Joi.ObjectSchema<PluginOptions>;