@docusaurus/plugin-content-blog 3.8.1-canary-6350 → 3.8.1-canary-6353
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 -6
- package/package.json +10 -10
- package/src/index.ts +2 -8
package/lib/index.js
CHANGED
|
@@ -29,7 +29,7 @@ async function pluginContentBlog(context, options) {
|
|
|
29
29
|
if (isBlogFeedDisabledBecauseOfHashRouter) {
|
|
30
30
|
logger_1.default.warn(`${PluginName} feed feature does not support the Hash Router. Feeds won't be generated.`);
|
|
31
31
|
}
|
|
32
|
-
const {
|
|
32
|
+
const { baseUrl } = siteConfig;
|
|
33
33
|
const contentPaths = {
|
|
34
34
|
contentPath: path_1.default.resolve(siteDir, options.path),
|
|
35
35
|
contentPathLocalized: (0, utils_1.getPluginI18nPath)({
|
|
@@ -89,16 +89,12 @@ async function pluginContentBlog(context, options) {
|
|
|
89
89
|
},
|
|
90
90
|
markdownConfig: siteConfig.markdown,
|
|
91
91
|
resolveMarkdownLink: ({ linkPathname, sourceFilePath }) => {
|
|
92
|
-
|
|
92
|
+
return (0, utils_1.resolveMarkdownLinkPathname)(linkPathname, {
|
|
93
93
|
sourceFilePath,
|
|
94
94
|
sourceToPermalink: contentHelpers.sourceToPermalink,
|
|
95
95
|
siteDir,
|
|
96
96
|
contentPaths,
|
|
97
97
|
});
|
|
98
|
-
if (permalink === null) {
|
|
99
|
-
logger_1.default.report(onBrokenMarkdownLinks) `Blog markdown link couldn't be resolved: (url=${linkPathname}) in source file path=${sourceFilePath}`;
|
|
100
|
-
}
|
|
101
|
-
return permalink;
|
|
102
98
|
},
|
|
103
99
|
});
|
|
104
100
|
function createBlogMarkdownLoader() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/plugin-content-blog",
|
|
3
|
-
"version": "3.8.1-canary-
|
|
3
|
+
"version": "3.8.1-canary-6353",
|
|
4
4
|
"description": "Blog plugin for Docusaurus.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/plugin-content-blog.d.ts",
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
},
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@docusaurus/core": "3.8.1-canary-
|
|
35
|
-
"@docusaurus/logger": "3.8.1-canary-
|
|
36
|
-
"@docusaurus/mdx-loader": "3.8.1-canary-
|
|
37
|
-
"@docusaurus/theme-common": "3.8.1-canary-
|
|
38
|
-
"@docusaurus/types": "3.8.1-canary-
|
|
39
|
-
"@docusaurus/utils": "3.8.1-canary-
|
|
40
|
-
"@docusaurus/utils-common": "3.8.1-canary-
|
|
41
|
-
"@docusaurus/utils-validation": "3.8.1-canary-
|
|
34
|
+
"@docusaurus/core": "3.8.1-canary-6353",
|
|
35
|
+
"@docusaurus/logger": "3.8.1-canary-6353",
|
|
36
|
+
"@docusaurus/mdx-loader": "3.8.1-canary-6353",
|
|
37
|
+
"@docusaurus/theme-common": "3.8.1-canary-6353",
|
|
38
|
+
"@docusaurus/types": "3.8.1-canary-6353",
|
|
39
|
+
"@docusaurus/utils": "3.8.1-canary-6353",
|
|
40
|
+
"@docusaurus/utils-common": "3.8.1-canary-6353",
|
|
41
|
+
"@docusaurus/utils-validation": "3.8.1-canary-6353",
|
|
42
42
|
"cheerio": "1.0.0-rc.12",
|
|
43
43
|
"feed": "^4.2.2",
|
|
44
44
|
"fs-extra": "^11.1.1",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"@total-typescript/shoehorn": "^0.1.2",
|
|
63
63
|
"tree-node-cli": "^1.6.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "341b17e813febec7a8a1ff39f92d7a5066b72eae"
|
|
66
66
|
}
|
package/src/index.ts
CHANGED
|
@@ -71,7 +71,7 @@ export default async function pluginContentBlog(
|
|
|
71
71
|
);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
const {
|
|
74
|
+
const {baseUrl} = siteConfig;
|
|
75
75
|
|
|
76
76
|
const contentPaths: BlogContentPaths = {
|
|
77
77
|
contentPath: path.resolve(siteDir, options.path),
|
|
@@ -154,18 +154,12 @@ export default async function pluginContentBlog(
|
|
|
154
154
|
},
|
|
155
155
|
markdownConfig: siteConfig.markdown,
|
|
156
156
|
resolveMarkdownLink: ({linkPathname, sourceFilePath}) => {
|
|
157
|
-
|
|
157
|
+
return resolveMarkdownLinkPathname(linkPathname, {
|
|
158
158
|
sourceFilePath,
|
|
159
159
|
sourceToPermalink: contentHelpers.sourceToPermalink,
|
|
160
160
|
siteDir,
|
|
161
161
|
contentPaths,
|
|
162
162
|
});
|
|
163
|
-
if (permalink === null) {
|
|
164
|
-
logger.report(
|
|
165
|
-
onBrokenMarkdownLinks,
|
|
166
|
-
)`Blog markdown link couldn't be resolved: (url=${linkPathname}) in source file path=${sourceFilePath}`;
|
|
167
|
-
}
|
|
168
|
-
return permalink;
|
|
169
163
|
},
|
|
170
164
|
});
|
|
171
165
|
|