@docusaurus/plugin-content-blog 3.3.2 → 3.5.0
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/assets/atom.css +75 -0
- package/assets/atom.xsl +92 -0
- package/assets/rss.css +75 -0
- package/assets/rss.xsl +86 -0
- package/lib/authors.d.ts +9 -11
- package/lib/authors.js +42 -64
- package/lib/authorsMap.d.ts +23 -0
- package/lib/authorsMap.js +116 -0
- package/lib/authorsProblems.d.ts +21 -0
- package/lib/authorsProblems.js +51 -0
- package/lib/authorsSocials.d.ts +10 -0
- package/lib/authorsSocials.js +48 -0
- package/lib/blogUtils.d.ts +7 -12
- package/lib/blogUtils.js +44 -34
- package/lib/client/contexts.d.ts +33 -0
- package/lib/client/contexts.js +54 -0
- package/lib/client/index.d.ts +3 -3
- package/lib/client/index.js +3 -9
- package/lib/client/sidebarUtils.d.ts +21 -0
- package/lib/client/sidebarUtils.js +49 -0
- package/lib/client/sidebarUtils.test.d.ts +7 -0
- package/lib/client/sidebarUtils.test.js +43 -0
- package/lib/client/structuredDataUtils.d.ts +10 -0
- package/lib/client/structuredDataUtils.js +122 -0
- package/lib/feed.d.ts +8 -3
- package/lib/feed.js +111 -20
- package/lib/frontMatter.d.ts +0 -1
- package/lib/frontMatter.js +3 -2
- package/lib/index.d.ts +0 -1
- package/lib/index.js +132 -105
- package/lib/markdownLoader.js +3 -7
- package/lib/options.d.ts +4 -1
- package/lib/options.js +107 -26
- package/lib/props.d.ts +9 -2
- package/lib/props.js +23 -3
- package/lib/remark/footnoteIDFixer.js +1 -1
- package/lib/routes.d.ts +0 -1
- package/lib/routes.js +82 -14
- package/lib/translations.d.ts +0 -1
- package/lib/translations.js +2 -3
- package/lib/types.d.ts +1 -8
- package/package.json +13 -10
- package/src/authors.ts +56 -93
- package/src/authorsMap.ts +171 -0
- package/src/authorsProblems.ts +72 -0
- package/src/authorsSocials.ts +64 -0
- package/src/blogUtils.ts +51 -46
- package/src/client/contexts.tsx +95 -0
- package/src/client/index.tsx +24 -0
- package/src/client/sidebarUtils.test.ts +52 -0
- package/src/client/sidebarUtils.tsx +85 -0
- package/src/client/structuredDataUtils.ts +178 -0
- package/src/feed.ts +197 -18
- package/src/frontMatter.ts +2 -0
- package/src/index.ts +182 -137
- package/src/markdownLoader.ts +3 -7
- package/src/options.ts +132 -32
- package/src/plugin-content-blog.d.ts +252 -113
- package/src/props.ts +41 -1
- package/src/routes.ts +102 -12
- package/src/types.ts +1 -6
- package/src/client/index.ts +0 -20
|
@@ -0,0 +1,122 @@
|
|
|
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 { useBaseUrlUtils } from '@docusaurus/useBaseUrl';
|
|
8
|
+
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
9
|
+
import { useBlogMetadata } from '@docusaurus/plugin-content-blog/client';
|
|
10
|
+
import { useBlogPost } from './contexts';
|
|
11
|
+
const convertDate = (dateMs) => new Date(dateMs).toISOString();
|
|
12
|
+
function getBlogPost(blogPostContent, siteConfig, withBaseUrl) {
|
|
13
|
+
const { assets, frontMatter, metadata } = blogPostContent;
|
|
14
|
+
const { date, title, description, lastUpdatedAt } = metadata;
|
|
15
|
+
const image = assets.image ?? frontMatter.image;
|
|
16
|
+
const keywords = frontMatter.keywords ?? [];
|
|
17
|
+
const blogUrl = `${siteConfig.url}${metadata.permalink}`;
|
|
18
|
+
const dateModified = lastUpdatedAt ? convertDate(lastUpdatedAt) : undefined;
|
|
19
|
+
return {
|
|
20
|
+
'@type': 'BlogPosting',
|
|
21
|
+
'@id': blogUrl,
|
|
22
|
+
mainEntityOfPage: blogUrl,
|
|
23
|
+
url: blogUrl,
|
|
24
|
+
headline: title,
|
|
25
|
+
name: title,
|
|
26
|
+
description,
|
|
27
|
+
datePublished: date,
|
|
28
|
+
...(dateModified ? { dateModified } : {}),
|
|
29
|
+
...getAuthor(metadata.authors),
|
|
30
|
+
...getImage(image, withBaseUrl, title),
|
|
31
|
+
...(keywords ? { keywords } : {}),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function getAuthor(authors) {
|
|
35
|
+
const authorsStructuredData = authors.map(createPersonStructuredData);
|
|
36
|
+
return {
|
|
37
|
+
author: authorsStructuredData.length === 1
|
|
38
|
+
? authorsStructuredData[0]
|
|
39
|
+
: authorsStructuredData,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function getImage(image, withBaseUrl, title) {
|
|
43
|
+
return image
|
|
44
|
+
? {
|
|
45
|
+
image: createImageStructuredData({
|
|
46
|
+
imageUrl: withBaseUrl(image, { absolute: true }),
|
|
47
|
+
caption: `title image for the blog post: ${title}`,
|
|
48
|
+
}),
|
|
49
|
+
}
|
|
50
|
+
: {};
|
|
51
|
+
}
|
|
52
|
+
export function useBlogListPageStructuredData(props) {
|
|
53
|
+
const { siteConfig } = useDocusaurusContext();
|
|
54
|
+
const { withBaseUrl } = useBaseUrlUtils();
|
|
55
|
+
const { metadata: { blogDescription, blogTitle, permalink }, } = props;
|
|
56
|
+
const url = `${siteConfig.url}${permalink}`;
|
|
57
|
+
// details on structured data support: https://schema.org/Blog
|
|
58
|
+
return {
|
|
59
|
+
'@context': 'https://schema.org',
|
|
60
|
+
'@type': 'Blog',
|
|
61
|
+
'@id': url,
|
|
62
|
+
mainEntityOfPage: url,
|
|
63
|
+
headline: blogTitle,
|
|
64
|
+
description: blogDescription,
|
|
65
|
+
blogPost: props.items.map((blogItem) => getBlogPost(blogItem.content, siteConfig, withBaseUrl)),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export function useBlogPostStructuredData() {
|
|
69
|
+
const blogMetadata = useBlogMetadata();
|
|
70
|
+
const { assets, metadata } = useBlogPost();
|
|
71
|
+
const { siteConfig } = useDocusaurusContext();
|
|
72
|
+
const { withBaseUrl } = useBaseUrlUtils();
|
|
73
|
+
const { date, title, description, frontMatter, lastUpdatedAt } = metadata;
|
|
74
|
+
const image = assets.image ?? frontMatter.image;
|
|
75
|
+
const keywords = frontMatter.keywords ?? [];
|
|
76
|
+
const dateModified = lastUpdatedAt ? convertDate(lastUpdatedAt) : undefined;
|
|
77
|
+
const url = `${siteConfig.url}${metadata.permalink}`;
|
|
78
|
+
// details on structured data support: https://schema.org/BlogPosting
|
|
79
|
+
// BlogPosting is one of the structured data types that Google explicitly
|
|
80
|
+
// supports: https://developers.google.com/search/docs/appearance/structured-data/article#structured-data-type-definitions
|
|
81
|
+
return {
|
|
82
|
+
'@context': 'https://schema.org',
|
|
83
|
+
'@type': 'BlogPosting',
|
|
84
|
+
'@id': url,
|
|
85
|
+
mainEntityOfPage: url,
|
|
86
|
+
url,
|
|
87
|
+
headline: title,
|
|
88
|
+
name: title,
|
|
89
|
+
description,
|
|
90
|
+
datePublished: date,
|
|
91
|
+
...(dateModified ? { dateModified } : {}),
|
|
92
|
+
...getAuthor(metadata.authors),
|
|
93
|
+
...getImage(image, withBaseUrl, title),
|
|
94
|
+
...(keywords ? { keywords } : {}),
|
|
95
|
+
isPartOf: {
|
|
96
|
+
'@type': 'Blog',
|
|
97
|
+
'@id': `${siteConfig.url}${blogMetadata.blogBasePath}`,
|
|
98
|
+
name: blogMetadata.blogTitle,
|
|
99
|
+
},
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
/** @returns A {@link https://schema.org/Person} constructed from the {@link Author} */
|
|
103
|
+
function createPersonStructuredData(author) {
|
|
104
|
+
return {
|
|
105
|
+
'@type': 'Person',
|
|
106
|
+
...(author.name ? { name: author.name } : {}),
|
|
107
|
+
...(author.title ? { description: author.title } : {}),
|
|
108
|
+
...(author.url ? { url: author.url } : {}),
|
|
109
|
+
...(author.email ? { email: author.email } : {}),
|
|
110
|
+
...(author.imageURL ? { image: author.imageURL } : {}),
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
/** @returns A {@link https://schema.org/ImageObject} */
|
|
114
|
+
function createImageStructuredData({ imageUrl, caption, }) {
|
|
115
|
+
return {
|
|
116
|
+
'@type': 'ImageObject',
|
|
117
|
+
'@id': imageUrl,
|
|
118
|
+
url: imageUrl,
|
|
119
|
+
contentUrl: imageUrl,
|
|
120
|
+
caption,
|
|
121
|
+
};
|
|
122
|
+
}
|
package/lib/feed.d.ts
CHANGED
|
@@ -4,13 +4,18 @@
|
|
|
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
|
-
import type { DocusaurusConfig } from '@docusaurus/types';
|
|
7
|
+
import type { BlogContentPaths } from './types';
|
|
8
|
+
import type { DocusaurusConfig, HtmlTags, LoadContext } from '@docusaurus/types';
|
|
9
9
|
import type { PluginOptions, BlogPost } from '@docusaurus/plugin-content-blog';
|
|
10
|
-
export declare function createBlogFeedFiles({ blogPosts: allBlogPosts, options, siteConfig, outDir, locale, }: {
|
|
10
|
+
export declare function createBlogFeedFiles({ blogPosts: allBlogPosts, options, siteConfig, outDir, locale, contentPaths, }: {
|
|
11
11
|
blogPosts: BlogPost[];
|
|
12
12
|
options: PluginOptions;
|
|
13
13
|
siteConfig: DocusaurusConfig;
|
|
14
14
|
outDir: string;
|
|
15
15
|
locale: string;
|
|
16
|
+
contentPaths: BlogContentPaths;
|
|
16
17
|
}): Promise<void>;
|
|
18
|
+
export declare function createFeedHtmlHeadTags({ context, options, }: {
|
|
19
|
+
context: LoadContext;
|
|
20
|
+
options: PluginOptions;
|
|
21
|
+
}): HtmlTags;
|
package/lib/feed.js
CHANGED
|
@@ -6,16 +6,17 @@
|
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.createBlogFeedFiles =
|
|
9
|
+
exports.createBlogFeedFiles = createBlogFeedFiles;
|
|
10
|
+
exports.createFeedHtmlHeadTags = createFeedHtmlHeadTags;
|
|
10
11
|
const tslib_1 = require("tslib");
|
|
11
12
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
12
13
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
13
|
-
const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
|
|
14
14
|
const feed_1 = require("feed");
|
|
15
15
|
const srcset = tslib_1.__importStar(require("srcset"));
|
|
16
16
|
const utils_1 = require("@docusaurus/utils");
|
|
17
17
|
const utils_common_1 = require("@docusaurus/utils-common");
|
|
18
18
|
const cheerio_1 = require("cheerio");
|
|
19
|
+
const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
|
|
19
20
|
async function generateBlogFeed({ blogPosts, options, siteConfig, outDir, locale, }) {
|
|
20
21
|
if (!blogPosts.length) {
|
|
21
22
|
return null;
|
|
@@ -105,25 +106,72 @@ async function defaultCreateFeedItems({ blogPosts, siteConfig, outDir, }) {
|
|
|
105
106
|
return feedItem;
|
|
106
107
|
}));
|
|
107
108
|
}
|
|
108
|
-
async function
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
109
|
+
async function resolveXsltFilePaths({ xsltFilePath, contentPaths, }) {
|
|
110
|
+
const xsltAbsolutePath = path_1.default.isAbsolute(xsltFilePath)
|
|
111
|
+
? xsltFilePath
|
|
112
|
+
: (await (0, utils_1.getDataFilePath)({ filePath: xsltFilePath, contentPaths })) ??
|
|
113
|
+
path_1.default.resolve(contentPaths.contentPath, xsltFilePath);
|
|
114
|
+
if (!(await fs_extra_1.default.pathExists(xsltAbsolutePath))) {
|
|
115
|
+
throw new Error(logger_1.default.interpolate `Blog feed XSLT file not found at path=${path_1.default.relative(process.cwd(), xsltAbsolutePath)}`);
|
|
116
|
+
}
|
|
117
|
+
const parsedPath = path_1.default.parse(xsltAbsolutePath);
|
|
118
|
+
const cssAbsolutePath = path_1.default.resolve(parsedPath.dir, `${parsedPath.name}.css`);
|
|
119
|
+
if (!(await fs_extra_1.default.pathExists(xsltAbsolutePath))) {
|
|
120
|
+
throw new Error(logger_1.default.interpolate `Blog feed XSLT file was found at path=${path_1.default.relative(process.cwd(), xsltAbsolutePath)}
|
|
121
|
+
But its expected co-located CSS file could not be found at path=${path_1.default.relative(process.cwd(), cssAbsolutePath)}
|
|
122
|
+
If you want to provide a custom XSLT file, you must provide a CSS file with the exact same name.`);
|
|
123
|
+
}
|
|
124
|
+
return { xsltAbsolutePath, cssAbsolutePath };
|
|
125
|
+
}
|
|
126
|
+
async function generateXsltFiles({ xsltFilePath, generatePath, contentPaths, }) {
|
|
127
|
+
const { xsltAbsolutePath, cssAbsolutePath } = await resolveXsltFilePaths({
|
|
128
|
+
xsltFilePath,
|
|
129
|
+
contentPaths,
|
|
130
|
+
});
|
|
131
|
+
const xsltOutputPath = path_1.default.join(generatePath, path_1.default.basename(xsltAbsolutePath));
|
|
132
|
+
const cssOutputPath = path_1.default.join(generatePath, path_1.default.basename(cssAbsolutePath));
|
|
133
|
+
await fs_extra_1.default.copy(xsltAbsolutePath, xsltOutputPath);
|
|
134
|
+
await fs_extra_1.default.copy(cssAbsolutePath, cssOutputPath);
|
|
135
|
+
}
|
|
136
|
+
// This modifies the XML feed content to add a relative href to the XSLT file
|
|
137
|
+
// Good enough for now: we probably don't need a full XML parser just for that
|
|
138
|
+
// See also https://darekkay.com/blog/rss-styling/
|
|
139
|
+
function injectXslt({ feedContent, xsltFilePath, }) {
|
|
140
|
+
return feedContent.replace('<?xml version="1.0" encoding="utf-8"?>', `<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/xsl" href="${path_1.default.basename(xsltFilePath)}"?>`);
|
|
141
|
+
}
|
|
142
|
+
const FeedConfigs = {
|
|
143
|
+
rss: {
|
|
144
|
+
outputFileName: 'rss.xml',
|
|
145
|
+
getContent: (feed) => feed.rss2(),
|
|
146
|
+
getXsltFilePath: (xslt) => xslt.rss,
|
|
147
|
+
},
|
|
148
|
+
atom: {
|
|
149
|
+
outputFileName: 'atom.xml',
|
|
150
|
+
getContent: (feed) => feed.atom1(),
|
|
151
|
+
getXsltFilePath: (xslt) => xslt.atom,
|
|
152
|
+
},
|
|
153
|
+
json: {
|
|
154
|
+
outputFileName: 'feed.json',
|
|
155
|
+
getContent: (feed) => feed.json1(),
|
|
156
|
+
getXsltFilePath: () => null,
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
async function createBlogFeedFile({ feed, feedType, generatePath, feedOptions, contentPaths, }) {
|
|
121
160
|
try {
|
|
122
|
-
|
|
161
|
+
const feedConfig = FeedConfigs[feedType];
|
|
162
|
+
let feedContent = feedConfig.getContent(feed);
|
|
163
|
+
const xsltFilePath = feedConfig.getXsltFilePath(feedOptions.xslt);
|
|
164
|
+
if (xsltFilePath) {
|
|
165
|
+
await generateXsltFiles({ xsltFilePath, contentPaths, generatePath });
|
|
166
|
+
feedContent = injectXslt({ feedContent, xsltFilePath });
|
|
167
|
+
}
|
|
168
|
+
const outputPath = path_1.default.join(generatePath, feedConfig.outputFileName);
|
|
169
|
+
await fs_extra_1.default.outputFile(outputPath, feedContent);
|
|
123
170
|
}
|
|
124
171
|
catch (err) {
|
|
125
|
-
|
|
126
|
-
|
|
172
|
+
throw new Error(`Generating ${feedType} feed failed.`, {
|
|
173
|
+
cause: err,
|
|
174
|
+
});
|
|
127
175
|
}
|
|
128
176
|
}
|
|
129
177
|
function shouldBeInFeed(blogPost) {
|
|
@@ -131,7 +179,7 @@ function shouldBeInFeed(blogPost) {
|
|
|
131
179
|
blogPost.metadata.frontMatter.unlisted;
|
|
132
180
|
return !excluded;
|
|
133
181
|
}
|
|
134
|
-
async function createBlogFeedFiles({ blogPosts: allBlogPosts, options, siteConfig, outDir, locale, }) {
|
|
182
|
+
async function createBlogFeedFiles({ blogPosts: allBlogPosts, options, siteConfig, outDir, locale, contentPaths, }) {
|
|
135
183
|
const blogPosts = allBlogPosts.filter(shouldBeInFeed);
|
|
136
184
|
const feed = await generateBlogFeed({
|
|
137
185
|
blogPosts,
|
|
@@ -148,6 +196,49 @@ async function createBlogFeedFiles({ blogPosts: allBlogPosts, options, siteConfi
|
|
|
148
196
|
feed,
|
|
149
197
|
feedType,
|
|
150
198
|
generatePath: path_1.default.join(outDir, options.routeBasePath),
|
|
199
|
+
feedOptions: options.feedOptions,
|
|
200
|
+
contentPaths,
|
|
151
201
|
})));
|
|
152
202
|
}
|
|
153
|
-
|
|
203
|
+
function createFeedHtmlHeadTags({ context, options, }) {
|
|
204
|
+
const feedTypes = options.feedOptions.type;
|
|
205
|
+
if (!feedTypes) {
|
|
206
|
+
return [];
|
|
207
|
+
}
|
|
208
|
+
const feedTitle = options.feedOptions.title ?? context.siteConfig.title;
|
|
209
|
+
const feedsConfig = {
|
|
210
|
+
rss: {
|
|
211
|
+
type: 'application/rss+xml',
|
|
212
|
+
path: 'rss.xml',
|
|
213
|
+
title: `${feedTitle} RSS Feed`,
|
|
214
|
+
},
|
|
215
|
+
atom: {
|
|
216
|
+
type: 'application/atom+xml',
|
|
217
|
+
path: 'atom.xml',
|
|
218
|
+
title: `${feedTitle} Atom Feed`,
|
|
219
|
+
},
|
|
220
|
+
json: {
|
|
221
|
+
type: 'application/json',
|
|
222
|
+
path: 'feed.json',
|
|
223
|
+
title: `${feedTitle} JSON Feed`,
|
|
224
|
+
},
|
|
225
|
+
};
|
|
226
|
+
const headTags = [];
|
|
227
|
+
feedTypes.forEach((feedType) => {
|
|
228
|
+
const { type, path: feedConfigPath, title: feedConfigTitle, } = feedsConfig[feedType];
|
|
229
|
+
headTags.push({
|
|
230
|
+
tagName: 'link',
|
|
231
|
+
attributes: {
|
|
232
|
+
rel: 'alternate',
|
|
233
|
+
type,
|
|
234
|
+
href: (0, utils_1.normalizeUrl)([
|
|
235
|
+
context.siteConfig.baseUrl,
|
|
236
|
+
options.routeBasePath,
|
|
237
|
+
feedConfigPath,
|
|
238
|
+
]),
|
|
239
|
+
title: feedConfigTitle,
|
|
240
|
+
},
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
return headTags;
|
|
244
|
+
}
|
package/lib/frontMatter.d.ts
CHANGED
package/lib/frontMatter.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateBlogPostFrontMatter =
|
|
3
|
+
exports.validateBlogPostFrontMatter = validateBlogPostFrontMatter;
|
|
4
4
|
/**
|
|
5
5
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -8,12 +8,14 @@ exports.validateBlogPostFrontMatter = void 0;
|
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
10
|
const utils_validation_1 = require("@docusaurus/utils-validation");
|
|
11
|
+
const authorsSocials_1 = require("./authorsSocials");
|
|
11
12
|
const BlogPostFrontMatterAuthorSchema = utils_validation_1.JoiFrontMatter.object({
|
|
12
13
|
key: utils_validation_1.JoiFrontMatter.string(),
|
|
13
14
|
name: utils_validation_1.JoiFrontMatter.string(),
|
|
14
15
|
title: utils_validation_1.JoiFrontMatter.string(),
|
|
15
16
|
url: utils_validation_1.URISchema,
|
|
16
17
|
imageURL: utils_validation_1.JoiFrontMatter.string(),
|
|
18
|
+
socials: authorsSocials_1.AuthorSocialsSchema,
|
|
17
19
|
})
|
|
18
20
|
.or('key', 'name', 'imageURL')
|
|
19
21
|
.rename('image_url', 'imageURL', { alias: true });
|
|
@@ -61,4 +63,3 @@ const BlogFrontMatterSchema = utils_validation_1.JoiFrontMatter.object({
|
|
|
61
63
|
function validateBlogPostFrontMatter(frontMatter) {
|
|
62
64
|
return (0, utils_validation_1.validateFrontMatter)(frontMatter, BlogFrontMatterSchema);
|
|
63
65
|
}
|
|
64
|
-
exports.validateBlogPostFrontMatter = validateBlogPostFrontMatter;
|
package/lib/index.d.ts
CHANGED
|
@@ -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
|
-
/// <reference path="../src/plugin-content-blog.d.ts" />
|
|
8
7
|
import type { LoadContext, Plugin } from '@docusaurus/types';
|
|
9
8
|
import type { PluginOptions, BlogContent } from '@docusaurus/plugin-content-blog';
|
|
10
9
|
export default function pluginContentBlog(context: LoadContext, options: PluginOptions): Promise<Plugin<BlogContent>>;
|