@docusaurus/plugin-content-blog 0.0.0-4872 → 0.0.0-4876
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 +1 -1
- package/lib/options.js +1 -1
- package/package.json +9 -9
- package/src/index.ts +1 -1
- package/src/options.ts +1 -1
package/lib/index.js
CHANGED
|
@@ -120,7 +120,7 @@ async function pluginContentBlog(context, options) {
|
|
|
120
120
|
routeBasePath,
|
|
121
121
|
archiveBasePath,
|
|
122
122
|
]);
|
|
123
|
-
//
|
|
123
|
+
// Create a blog archive route
|
|
124
124
|
const archiveProp = await createData(`${(0, utils_1.docuHash)(archiveUrl)}.json`, JSON.stringify({ blogPosts }, null, 2));
|
|
125
125
|
addRoute({
|
|
126
126
|
path: archiveUrl,
|
package/lib/options.js
CHANGED
|
@@ -85,7 +85,7 @@ const PluginOptionSchema = utils_validation_1.Joi.object({
|
|
|
85
85
|
.default(exports.DEFAULT_OPTIONS.feedOptions.type),
|
|
86
86
|
title: utils_validation_1.Joi.string().allow(''),
|
|
87
87
|
description: utils_validation_1.Joi.string().allow(''),
|
|
88
|
-
//
|
|
88
|
+
// Only add default value when user actually wants a feed (type is not null)
|
|
89
89
|
copyright: utils_validation_1.Joi.when('type', {
|
|
90
90
|
is: utils_validation_1.Joi.any().valid(null),
|
|
91
91
|
then: utils_validation_1.Joi.string().optional(),
|
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-4876",
|
|
4
4
|
"description": "Blog plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/plugin-content-blog.d.ts",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@docusaurus/core": "0.0.0-
|
|
22
|
-
"@docusaurus/logger": "0.0.0-
|
|
23
|
-
"@docusaurus/mdx-loader": "0.0.0-
|
|
24
|
-
"@docusaurus/utils": "0.0.0-
|
|
25
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
26
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
21
|
+
"@docusaurus/core": "0.0.0-4876",
|
|
22
|
+
"@docusaurus/logger": "0.0.0-4876",
|
|
23
|
+
"@docusaurus/mdx-loader": "0.0.0-4876",
|
|
24
|
+
"@docusaurus/utils": "0.0.0-4876",
|
|
25
|
+
"@docusaurus/utils-common": "0.0.0-4876",
|
|
26
|
+
"@docusaurus/utils-validation": "0.0.0-4876",
|
|
27
27
|
"cheerio": "^1.0.0-rc.10",
|
|
28
28
|
"feed": "^4.2.2",
|
|
29
29
|
"fs-extra": "^10.0.1",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"webpack": "^5.72.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@docusaurus/types": "0.0.0-
|
|
38
|
+
"@docusaurus/types": "0.0.0-4876",
|
|
39
39
|
"escape-string-regexp": "^4.0.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=14"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "ed43a09bc7cd70a5035d8ec19eb53393fd83dc4f"
|
|
49
49
|
}
|
package/src/index.ts
CHANGED
|
@@ -218,7 +218,7 @@ export default async function pluginContentBlog(
|
|
|
218
218
|
routeBasePath,
|
|
219
219
|
archiveBasePath,
|
|
220
220
|
]);
|
|
221
|
-
//
|
|
221
|
+
// Create a blog archive route
|
|
222
222
|
const archiveProp = await createData(
|
|
223
223
|
`${docuHash(archiveUrl)}.json`,
|
|
224
224
|
JSON.stringify({blogPosts}, null, 2),
|
package/src/options.ts
CHANGED
|
@@ -111,7 +111,7 @@ const PluginOptionSchema = Joi.object<PluginOptions>({
|
|
|
111
111
|
.default(DEFAULT_OPTIONS.feedOptions.type),
|
|
112
112
|
title: Joi.string().allow(''),
|
|
113
113
|
description: Joi.string().allow(''),
|
|
114
|
-
//
|
|
114
|
+
// Only add default value when user actually wants a feed (type is not null)
|
|
115
115
|
copyright: Joi.when('type', {
|
|
116
116
|
is: Joi.any().valid(null),
|
|
117
117
|
then: Joi.string().optional(),
|