@docusaurus/plugin-content-blog 0.0.0-5010 → 0.0.0-5012
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/blogUtils.d.ts +1 -1
- package/lib/blogUtils.js +2 -2
- package/lib/feed.js +4 -4
- package/lib/index.js +2 -2
- package/package.json +9 -9
- package/src/authors.ts +1 -1
- package/src/blogUtils.ts +4 -4
- package/src/feed.ts +4 -4
- package/src/index.ts +6 -6
- package/src/plugin-content-blog.d.ts +1 -1
package/lib/blogUtils.d.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
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
|
-
import type { BlogContentPaths, BlogMarkdownLoaderOptions } from './types';
|
|
8
7
|
import type { LoadContext } from '@docusaurus/types';
|
|
9
8
|
import type { PluginOptions, BlogPost, BlogTags, BlogPaginated } from '@docusaurus/plugin-content-blog';
|
|
9
|
+
import type { BlogContentPaths, BlogMarkdownLoaderOptions } from './types';
|
|
10
10
|
export declare function truncate(fileString: string, truncateMarker: RegExp): string;
|
|
11
11
|
export declare function getSourceToPermalink(blogPosts: BlogPost[]): {
|
|
12
12
|
[aliasedPath: string]: string;
|
package/lib/blogUtils.js
CHANGED
|
@@ -10,12 +10,12 @@ exports.linkify = exports.generateBlogPosts = exports.parseBlogFileName = export
|
|
|
10
10
|
const tslib_1 = require("tslib");
|
|
11
11
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
12
12
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
13
|
-
const reading_time_1 = tslib_1.__importDefault(require("reading-time"));
|
|
14
13
|
const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
|
14
|
+
const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
|
|
15
|
+
const reading_time_1 = tslib_1.__importDefault(require("reading-time"));
|
|
15
16
|
const utils_1 = require("@docusaurus/utils");
|
|
16
17
|
const frontMatter_1 = require("./frontMatter");
|
|
17
18
|
const authors_1 = require("./authors");
|
|
18
|
-
const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
|
|
19
19
|
function truncate(fileString, truncateMarker) {
|
|
20
20
|
return fileString.split(truncateMarker, 1).shift();
|
|
21
21
|
}
|
package/lib/feed.js
CHANGED
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.createBlogFeedFiles = void 0;
|
|
10
10
|
const tslib_1 = require("tslib");
|
|
11
|
-
const feed_1 = require("feed");
|
|
12
|
-
const utils_1 = require("@docusaurus/utils");
|
|
13
|
-
const cheerio_1 = require("cheerio");
|
|
14
11
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
15
12
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
16
|
-
const utils_common_1 = require("@docusaurus/utils-common");
|
|
17
13
|
const logger_1 = tslib_1.__importDefault(require("@docusaurus/logger"));
|
|
14
|
+
const feed_1 = require("feed");
|
|
15
|
+
const utils_1 = require("@docusaurus/utils");
|
|
16
|
+
const utils_common_1 = require("@docusaurus/utils-common");
|
|
17
|
+
const cheerio_1 = require("cheerio");
|
|
18
18
|
async function generateBlogFeed({ blogPosts, options, siteConfig, outDir, locale, }) {
|
|
19
19
|
if (!blogPosts.length) {
|
|
20
20
|
return null;
|
package/lib/index.js
CHANGED
|
@@ -9,11 +9,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.validateOptions = void 0;
|
|
10
10
|
const tslib_1 = require("tslib");
|
|
11
11
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
12
|
+
const utils_1 = require("@docusaurus/utils");
|
|
12
13
|
const remark_admonitions_1 = tslib_1.__importDefault(require("remark-admonitions"));
|
|
14
|
+
const blogUtils_1 = require("./blogUtils");
|
|
13
15
|
const footnoteIDFixer_1 = tslib_1.__importDefault(require("./remark/footnoteIDFixer"));
|
|
14
|
-
const utils_1 = require("@docusaurus/utils");
|
|
15
16
|
const translations_1 = require("./translations");
|
|
16
|
-
const blogUtils_1 = require("./blogUtils");
|
|
17
17
|
const feed_1 = require("./feed");
|
|
18
18
|
async function pluginContentBlog(context, options) {
|
|
19
19
|
if (options.admonitions) {
|
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-5012",
|
|
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-5012",
|
|
22
|
+
"@docusaurus/logger": "0.0.0-5012",
|
|
23
|
+
"@docusaurus/mdx-loader": "0.0.0-5012",
|
|
24
|
+
"@docusaurus/utils": "0.0.0-5012",
|
|
25
|
+
"@docusaurus/utils-common": "0.0.0-5012",
|
|
26
|
+
"@docusaurus/utils-validation": "0.0.0-5012",
|
|
27
27
|
"cheerio": "^1.0.0-rc.10",
|
|
28
28
|
"feed": "^4.2.2",
|
|
29
29
|
"fs-extra": "^10.1.0",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"webpack": "^5.72.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@docusaurus/types": "0.0.0-
|
|
39
|
+
"@docusaurus/types": "0.0.0-5012",
|
|
40
40
|
"escape-string-regexp": "^4.0.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=14"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "23b7a134145506adf6db87c8e81640e3633c13ec"
|
|
50
50
|
}
|
package/src/authors.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type {BlogContentPaths} from './types';
|
|
9
8
|
import {getDataFileData} from '@docusaurus/utils';
|
|
10
9
|
import {Joi, URISchema} from '@docusaurus/utils-validation';
|
|
10
|
+
import type {BlogContentPaths} from './types';
|
|
11
11
|
import type {
|
|
12
12
|
Author,
|
|
13
13
|
BlogPostFrontMatter,
|
package/src/blogUtils.ts
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
import fs from 'fs-extra';
|
|
9
9
|
import path from 'path';
|
|
10
|
-
import readingTime from 'reading-time';
|
|
11
10
|
import _ from 'lodash';
|
|
12
|
-
import
|
|
11
|
+
import logger from '@docusaurus/logger';
|
|
12
|
+
import readingTime from 'reading-time';
|
|
13
13
|
import {
|
|
14
14
|
parseMarkdownString,
|
|
15
15
|
normalizeUrl,
|
|
@@ -24,10 +24,9 @@ import {
|
|
|
24
24
|
getFileCommitDate,
|
|
25
25
|
getContentPathList,
|
|
26
26
|
} from '@docusaurus/utils';
|
|
27
|
-
import type {LoadContext} from '@docusaurus/types';
|
|
28
27
|
import {validateBlogPostFrontMatter} from './frontMatter';
|
|
29
28
|
import {type AuthorsMap, getAuthorsMap, getBlogPostAuthors} from './authors';
|
|
30
|
-
import
|
|
29
|
+
import type {LoadContext} from '@docusaurus/types';
|
|
31
30
|
import type {
|
|
32
31
|
PluginOptions,
|
|
33
32
|
ReadingTimeFunction,
|
|
@@ -35,6 +34,7 @@ import type {
|
|
|
35
34
|
BlogTags,
|
|
36
35
|
BlogPaginated,
|
|
37
36
|
} from '@docusaurus/plugin-content-blog';
|
|
37
|
+
import type {BlogContentPaths, BlogMarkdownLoaderOptions} from './types';
|
|
38
38
|
|
|
39
39
|
export function truncate(fileString: string, truncateMarker: RegExp): string {
|
|
40
40
|
return fileString.split(truncateMarker, 1).shift()!;
|
package/src/feed.ts
CHANGED
|
@@ -5,20 +5,20 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import path from 'path';
|
|
9
|
+
import fs from 'fs-extra';
|
|
10
|
+
import logger from '@docusaurus/logger';
|
|
8
11
|
import {Feed, type Author as FeedAuthor, type Item as FeedItem} from 'feed';
|
|
9
12
|
import {normalizeUrl, readOutputHTMLFile} from '@docusaurus/utils';
|
|
13
|
+
import {blogPostContainerID} from '@docusaurus/utils-common';
|
|
10
14
|
import {load as cheerioLoad} from 'cheerio';
|
|
11
15
|
import type {DocusaurusConfig} from '@docusaurus/types';
|
|
12
|
-
import path from 'path';
|
|
13
|
-
import fs from 'fs-extra';
|
|
14
16
|
import type {
|
|
15
17
|
FeedType,
|
|
16
18
|
PluginOptions,
|
|
17
19
|
Author,
|
|
18
20
|
BlogPost,
|
|
19
21
|
} from '@docusaurus/plugin-content-blog';
|
|
20
|
-
import {blogPostContainerID} from '@docusaurus/utils-common';
|
|
21
|
-
import logger from '@docusaurus/logger';
|
|
22
22
|
|
|
23
23
|
async function generateBlogFeed({
|
|
24
24
|
blogPosts,
|
package/src/index.ts
CHANGED
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import path from 'path';
|
|
9
|
-
import admonitions from 'remark-admonitions';
|
|
10
|
-
import footnoteIDFixer from './remark/footnoteIDFixer';
|
|
11
9
|
import {
|
|
12
10
|
normalizeUrl,
|
|
13
11
|
docuHash,
|
|
@@ -23,17 +21,19 @@ import {
|
|
|
23
21
|
type TagsListItem,
|
|
24
22
|
type TagModule,
|
|
25
23
|
} from '@docusaurus/utils';
|
|
26
|
-
import
|
|
27
|
-
|
|
28
|
-
import type {BlogContentPaths, BlogMarkdownLoaderOptions} from './types';
|
|
29
|
-
import type {LoadContext, Plugin, HtmlTags} from '@docusaurus/types';
|
|
24
|
+
import admonitions from 'remark-admonitions';
|
|
30
25
|
import {
|
|
31
26
|
generateBlogPosts,
|
|
32
27
|
getSourceToPermalink,
|
|
33
28
|
getBlogTags,
|
|
34
29
|
paginateBlogPosts,
|
|
35
30
|
} from './blogUtils';
|
|
31
|
+
import footnoteIDFixer from './remark/footnoteIDFixer';
|
|
32
|
+
import {translateContent, getTranslationFiles} from './translations';
|
|
36
33
|
import {createBlogFeedFiles} from './feed';
|
|
34
|
+
|
|
35
|
+
import type {BlogContentPaths, BlogMarkdownLoaderOptions} from './types';
|
|
36
|
+
import type {LoadContext, Plugin, HtmlTags} from '@docusaurus/types';
|
|
37
37
|
import type {
|
|
38
38
|
PluginOptions,
|
|
39
39
|
BlogPostFrontMatter,
|
|
@@ -538,11 +538,11 @@ declare module '@theme/BlogTagsListPage' {
|
|
|
538
538
|
}
|
|
539
539
|
|
|
540
540
|
declare module '@theme/BlogTagsPostsPage' {
|
|
541
|
+
import type {Content} from '@theme/BlogPostPage';
|
|
541
542
|
import type {
|
|
542
543
|
BlogSidebar,
|
|
543
544
|
BlogPaginatedMetadata,
|
|
544
545
|
} from '@docusaurus/plugin-content-blog';
|
|
545
|
-
import type {Content} from '@theme/BlogPostPage';
|
|
546
546
|
import type {TagModule} from '@docusaurus/utils';
|
|
547
547
|
|
|
548
548
|
export interface Props {
|