@docusaurus/plugin-content-blog 0.0.0-5982 → 0.0.0-5983
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/index.js +2 -1
- package/lib/options.js +2 -0
- package/package.json +9 -9
- package/src/index.ts +2 -0
- package/src/options.ts +3 -0
package/lib/index.js
CHANGED
|
@@ -162,13 +162,14 @@ async function pluginContentBlog(context, options) {
|
|
|
162
162
|
return (0, translations_1.translateContent)(content, translationFiles);
|
|
163
163
|
},
|
|
164
164
|
configureWebpack() {
|
|
165
|
-
const { admonitions, rehypePlugins, remarkPlugins, truncateMarker, beforeDefaultRemarkPlugins, beforeDefaultRehypePlugins, } = options;
|
|
165
|
+
const { admonitions, rehypePlugins, remarkPlugins, recmaPlugins, truncateMarker, beforeDefaultRemarkPlugins, beforeDefaultRehypePlugins, } = options;
|
|
166
166
|
const contentDirs = (0, utils_1.getContentPathList)(contentPaths);
|
|
167
167
|
function createMDXLoader() {
|
|
168
168
|
const loaderOptions = {
|
|
169
169
|
admonitions,
|
|
170
170
|
remarkPlugins,
|
|
171
171
|
rehypePlugins,
|
|
172
|
+
recmaPlugins,
|
|
172
173
|
beforeDefaultRemarkPlugins: [
|
|
173
174
|
footnoteIDFixer_1.default,
|
|
174
175
|
...beforeDefaultRemarkPlugins,
|
package/lib/options.js
CHANGED
|
@@ -18,6 +18,7 @@ exports.DEFAULT_OPTIONS = {
|
|
|
18
18
|
truncateMarker: /<!--\s*truncate\s*-->|\{\/\*\s*truncate\s*\*\/\}/,
|
|
19
19
|
rehypePlugins: [],
|
|
20
20
|
remarkPlugins: [],
|
|
21
|
+
recmaPlugins: [],
|
|
21
22
|
showReadingTime: true,
|
|
22
23
|
blogTagsPostsComponent: '@theme/BlogTagsPostsPage',
|
|
23
24
|
blogTagsListComponent: '@theme/BlogTagsListPage',
|
|
@@ -75,6 +76,7 @@ const PluginOptionSchema = utils_validation_1.Joi.object({
|
|
|
75
76
|
showReadingTime: utils_validation_1.Joi.bool().default(exports.DEFAULT_OPTIONS.showReadingTime),
|
|
76
77
|
remarkPlugins: utils_validation_1.RemarkPluginsSchema.default(exports.DEFAULT_OPTIONS.remarkPlugins),
|
|
77
78
|
rehypePlugins: utils_validation_1.RehypePluginsSchema.default(exports.DEFAULT_OPTIONS.rehypePlugins),
|
|
79
|
+
recmaPlugins: utils_validation_1.RecmaPluginsSchema.default(exports.DEFAULT_OPTIONS.recmaPlugins),
|
|
78
80
|
admonitions: utils_validation_1.AdmonitionsSchema.default(exports.DEFAULT_OPTIONS.admonitions),
|
|
79
81
|
editUrl: utils_validation_1.Joi.alternatives().try(utils_validation_1.URISchema, utils_validation_1.Joi.function()),
|
|
80
82
|
editLocalizedFiles: utils_validation_1.Joi.boolean().default(exports.DEFAULT_OPTIONS.editLocalizedFiles),
|
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-5983",
|
|
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-
|
|
35
|
-
"@docusaurus/logger": "0.0.0-
|
|
36
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
37
|
-
"@docusaurus/types": "0.0.0-
|
|
38
|
-
"@docusaurus/utils": "0.0.0-
|
|
39
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
40
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
34
|
+
"@docusaurus/core": "0.0.0-5983",
|
|
35
|
+
"@docusaurus/logger": "0.0.0-5983",
|
|
36
|
+
"@docusaurus/mdx-loader": "0.0.0-5983",
|
|
37
|
+
"@docusaurus/types": "0.0.0-5983",
|
|
38
|
+
"@docusaurus/utils": "0.0.0-5983",
|
|
39
|
+
"@docusaurus/utils-common": "0.0.0-5983",
|
|
40
|
+
"@docusaurus/utils-validation": "0.0.0-5983",
|
|
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": "
|
|
62
|
+
"gitHead": "303ced3b8c9e4b7674a42ebbbe73d24debeb211a"
|
|
63
63
|
}
|
package/src/index.ts
CHANGED
|
@@ -250,6 +250,7 @@ export default async function pluginContentBlog(
|
|
|
250
250
|
admonitions,
|
|
251
251
|
rehypePlugins,
|
|
252
252
|
remarkPlugins,
|
|
253
|
+
recmaPlugins,
|
|
253
254
|
truncateMarker,
|
|
254
255
|
beforeDefaultRemarkPlugins,
|
|
255
256
|
beforeDefaultRehypePlugins,
|
|
@@ -262,6 +263,7 @@ export default async function pluginContentBlog(
|
|
|
262
263
|
admonitions,
|
|
263
264
|
remarkPlugins,
|
|
264
265
|
rehypePlugins,
|
|
266
|
+
recmaPlugins,
|
|
265
267
|
beforeDefaultRemarkPlugins: [
|
|
266
268
|
footnoteIDFixer,
|
|
267
269
|
...beforeDefaultRemarkPlugins,
|
package/src/options.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
Joi,
|
|
10
10
|
RemarkPluginsSchema,
|
|
11
11
|
RehypePluginsSchema,
|
|
12
|
+
RecmaPluginsSchema,
|
|
12
13
|
AdmonitionsSchema,
|
|
13
14
|
RouteBasePathSchema,
|
|
14
15
|
URISchema,
|
|
@@ -29,6 +30,7 @@ export const DEFAULT_OPTIONS: PluginOptions = {
|
|
|
29
30
|
truncateMarker: /<!--\s*truncate\s*-->|\{\/\*\s*truncate\s*\*\/\}/,
|
|
30
31
|
rehypePlugins: [],
|
|
31
32
|
remarkPlugins: [],
|
|
33
|
+
recmaPlugins: [],
|
|
32
34
|
showReadingTime: true,
|
|
33
35
|
blogTagsPostsComponent: '@theme/BlogTagsPostsPage',
|
|
34
36
|
blogTagsListComponent: '@theme/BlogTagsListPage',
|
|
@@ -93,6 +95,7 @@ const PluginOptionSchema = Joi.object<PluginOptions>({
|
|
|
93
95
|
showReadingTime: Joi.bool().default(DEFAULT_OPTIONS.showReadingTime),
|
|
94
96
|
remarkPlugins: RemarkPluginsSchema.default(DEFAULT_OPTIONS.remarkPlugins),
|
|
95
97
|
rehypePlugins: RehypePluginsSchema.default(DEFAULT_OPTIONS.rehypePlugins),
|
|
98
|
+
recmaPlugins: RecmaPluginsSchema.default(DEFAULT_OPTIONS.recmaPlugins),
|
|
96
99
|
admonitions: AdmonitionsSchema.default(DEFAULT_OPTIONS.admonitions),
|
|
97
100
|
editUrl: Joi.alternatives().try(URISchema, Joi.function()),
|
|
98
101
|
editLocalizedFiles: Joi.boolean().default(DEFAULT_OPTIONS.editLocalizedFiles),
|