@docusaurus/plugin-content-blog 2.0.0-beta.0e652730d → 2.0.0-beta.10

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.
Files changed (66) hide show
  1. package/lib/.tsbuildinfo +1 -1
  2. package/lib/authors.d.ts +23 -0
  3. package/lib/authors.js +147 -0
  4. package/lib/blogFrontMatter.d.ts +19 -6
  5. package/lib/blogFrontMatter.js +35 -23
  6. package/lib/blogUtils.d.ts +10 -4
  7. package/lib/blogUtils.js +141 -136
  8. package/lib/feed.d.ts +20 -0
  9. package/lib/feed.js +90 -0
  10. package/lib/index.d.ts +1 -1
  11. package/lib/index.js +109 -112
  12. package/lib/markdownLoader.d.ts +3 -6
  13. package/lib/markdownLoader.js +5 -5
  14. package/lib/pluginOptionSchema.d.ts +3 -26
  15. package/lib/pluginOptionSchema.js +28 -7
  16. package/lib/translations.d.ts +10 -0
  17. package/lib/translations.js +53 -0
  18. package/lib/types.d.ts +54 -14
  19. package/package.json +19 -13
  20. package/src/__tests__/__fixtures__/authorsMapFiles/authors.json +29 -0
  21. package/src/__tests__/__fixtures__/authorsMapFiles/authors.yml +27 -0
  22. package/src/__tests__/__fixtures__/authorsMapFiles/authorsBad1.json +5 -0
  23. package/src/__tests__/__fixtures__/authorsMapFiles/authorsBad1.yml +3 -0
  24. package/src/__tests__/__fixtures__/authorsMapFiles/authorsBad2.json +3 -0
  25. package/src/__tests__/__fixtures__/authorsMapFiles/authorsBad2.yml +2 -0
  26. package/src/__tests__/__fixtures__/authorsMapFiles/authorsBad3.json +8 -0
  27. package/src/__tests__/__fixtures__/authorsMapFiles/authorsBad3.yml +3 -0
  28. package/src/__tests__/__fixtures__/component/Typography.tsx +6 -0
  29. package/src/__tests__/__fixtures__/getAuthorsMapFilePath/contentPathEmpty/empty +0 -0
  30. package/src/__tests__/__fixtures__/getAuthorsMapFilePath/contentPathJson1/authors.json +0 -0
  31. package/src/__tests__/__fixtures__/getAuthorsMapFilePath/contentPathJson2/authors.json +0 -0
  32. package/src/__tests__/__fixtures__/getAuthorsMapFilePath/contentPathNestedYml/sub/folder/authors.yml +0 -0
  33. package/src/__tests__/__fixtures__/getAuthorsMapFilePath/contentPathYml1/authors.yml +0 -0
  34. package/src/__tests__/__fixtures__/getAuthorsMapFilePath/contentPathYml2/authors.yml +0 -0
  35. package/src/__tests__/__fixtures__/website/blog/2018-12-14-Happy-First-Birthday-Slash.md +3 -0
  36. package/src/__tests__/__fixtures__/website/blog/_partials/somePartial.md +3 -0
  37. package/src/__tests__/__fixtures__/website/blog/_partials/subfolder/somePartial.md +3 -0
  38. package/src/__tests__/__fixtures__/website/blog/_somePartial.md +3 -0
  39. package/src/__tests__/__fixtures__/website/blog/authors.yml +4 -0
  40. package/src/__tests__/__fixtures__/website/blog/mdx-blog-post.mdx +36 -0
  41. package/src/__tests__/__fixtures__/website/blog/mdx-require-blog-post.mdx +14 -0
  42. package/src/__tests__/__fixtures__/website/blog/simple-slug.md +4 -0
  43. package/src/__tests__/__fixtures__/website/i18n/en/docusaurus-plugin-content-blog/2018-12-14-Happy-First-Birthday-Slash.md +3 -0
  44. package/src/__tests__/__fixtures__/website/i18n/en/docusaurus-plugin-content-blog/authors.yml +5 -0
  45. package/src/__tests__/__fixtures__/website/static/img/docusaurus.png +0 -0
  46. package/src/__tests__/__snapshots__/feed.test.ts.snap +164 -0
  47. package/src/__tests__/__snapshots__/translations.test.ts.snap +64 -0
  48. package/src/__tests__/authors.test.ts +608 -0
  49. package/src/__tests__/blogFrontMatter.test.ts +165 -36
  50. package/src/__tests__/blogUtils.test.ts +94 -0
  51. package/src/__tests__/{generateBlogFeed.test.ts → feed.test.ts} +35 -9
  52. package/src/__tests__/index.test.ts +84 -12
  53. package/src/__tests__/pluginOptionSchema.test.ts +3 -3
  54. package/src/__tests__/translations.test.ts +92 -0
  55. package/src/authors.ts +198 -0
  56. package/src/blogFrontMatter.ts +76 -37
  57. package/src/blogUtils.ts +202 -179
  58. package/{types.d.ts → src/deps.d.ts} +0 -0
  59. package/src/feed.ts +129 -0
  60. package/src/index.ts +131 -112
  61. package/src/markdownLoader.ts +8 -12
  62. package/{index.d.ts → src/plugin-content-blog.d.ts} +35 -31
  63. package/src/pluginOptionSchema.ts +31 -9
  64. package/src/translations.ts +63 -0
  65. package/src/types.ts +69 -16
  66. package/src/__tests__/__snapshots__/generateBlogFeed.test.ts.snap +0 -76
package/lib/types.d.ts CHANGED
@@ -5,31 +5,56 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
  import type { RemarkAndRehypePluginOptions } from '@docusaurus/mdx-loader';
8
- import { BrokenMarkdownLink, ContentPaths } from '@docusaurus/utils/lib/markdownLinks';
8
+ import type { Tag } from '@docusaurus/utils';
9
+ import type { BrokenMarkdownLink, ContentPaths } from '@docusaurus/utils/lib/markdownLinks';
10
+ import { Overwrite } from 'utility-types';
11
+ import { BlogPostFrontMatter } from './blogFrontMatter';
9
12
  export declare type BlogContentPaths = ContentPaths;
10
13
  export interface BlogContent {
14
+ blogSidebarTitle: string;
11
15
  blogPosts: BlogPost[];
12
16
  blogListPaginated: BlogPaginated[];
13
17
  blogTags: BlogTags;
14
18
  blogTagsListPath: string | null;
15
19
  }
16
- export interface DateLink {
17
- date: Date;
18
- link: string;
19
- }
20
20
  export declare type FeedType = 'rss' | 'atom';
21
+ export declare type FeedOptions = {
22
+ type?: FeedType[] | null;
23
+ title?: string;
24
+ description?: string;
25
+ copyright: string;
26
+ language?: string;
27
+ };
28
+ export declare type UserFeedOptions = Overwrite<Partial<FeedOptions>, {
29
+ type?: FeedOptions['type'] | 'all';
30
+ }>;
21
31
  export declare type EditUrlFunction = (editUrlParams: {
22
32
  blogDirPath: string;
23
33
  blogPath: string;
24
34
  permalink: string;
25
35
  locale: string;
26
36
  }) => string | undefined;
27
- export interface PluginOptions extends RemarkAndRehypePluginOptions {
37
+ declare type ReadingTimeOptions = {
38
+ wordsPerMinute?: number;
39
+ wordBound?: (char: string) => boolean;
40
+ };
41
+ export declare type ReadingTimeFunction = (params: {
42
+ content: string;
43
+ frontMatter?: BlogPostFrontMatter & Record<string, unknown>;
44
+ options?: ReadingTimeOptions;
45
+ }) => number;
46
+ export declare type ReadingTimeFunctionOption = (params: Required<Omit<Parameters<ReadingTimeFunction>[0], 'options'>> & {
47
+ defaultReadingTime: ReadingTimeFunction;
48
+ }) => number | undefined;
49
+ export declare type PluginOptions = RemarkAndRehypePluginOptions & {
28
50
  id?: string;
29
51
  path: string;
30
52
  routeBasePath: string;
53
+ tagsBasePath: string;
54
+ archiveBasePath: string;
31
55
  include: string[];
32
- postsPerPage: number;
56
+ exclude: string[];
57
+ postsPerPage: number | 'ALL';
33
58
  blogListComponent: string;
34
59
  blogPostComponent: string;
35
60
  blogTagsListComponent: string;
@@ -41,7 +66,7 @@ export interface PluginOptions extends RemarkAndRehypePluginOptions {
41
66
  truncateMarker: RegExp;
42
67
  showReadingTime: boolean;
43
68
  feedOptions: {
44
- type?: [FeedType] | null;
69
+ type?: FeedType[] | null;
45
70
  title?: string;
46
71
  description?: string;
47
72
  copyright: string;
@@ -50,7 +75,13 @@ export interface PluginOptions extends RemarkAndRehypePluginOptions {
50
75
  editUrl?: string | EditUrlFunction;
51
76
  editLocalizedFiles?: boolean;
52
77
  admonitions: Record<string, unknown>;
53
- }
78
+ authorsMapPath: string;
79
+ readingTime: ReadingTimeFunctionOption;
80
+ sortPosts: 'ascending' | 'descending';
81
+ };
82
+ export declare type UserPluginOptions = Overwrite<Partial<PluginOptions>, {
83
+ feedOptions?: UserFeedOptions;
84
+ }>;
54
85
  export interface BlogTags {
55
86
  [key: string]: BlogTag;
56
87
  }
@@ -62,6 +93,7 @@ export interface BlogTag {
62
93
  export interface BlogPost {
63
94
  id: string;
64
95
  metadata: MetaData;
96
+ content: string;
65
97
  }
66
98
  export interface BlogPaginatedMetadata {
67
99
  permalink: string;
@@ -78,28 +110,35 @@ export interface BlogPaginated {
78
110
  metadata: BlogPaginatedMetadata;
79
111
  items: string[];
80
112
  }
113
+ export interface Author extends Record<string, unknown> {
114
+ name?: string;
115
+ imageURL?: string;
116
+ url?: string;
117
+ title?: string;
118
+ }
81
119
  export interface MetaData {
82
120
  permalink: string;
83
121
  source: string;
84
122
  description: string;
85
123
  date: Date;
86
124
  formattedDate: string;
87
- tags: (Tag | string)[];
125
+ tags: Tag[];
88
126
  title: string;
89
127
  readingTime?: number;
90
128
  prevItem?: Paginator;
91
129
  nextItem?: Paginator;
92
130
  truncated: boolean;
93
131
  editUrl?: string;
132
+ authors: Author[];
133
+ }
134
+ export interface Assets {
135
+ image?: string;
136
+ authorsImageUrls: (string | undefined)[];
94
137
  }
95
138
  export interface Paginator {
96
139
  title: string;
97
140
  permalink: string;
98
141
  }
99
- export interface Tag {
100
- label: string;
101
- permalink: string;
102
- }
103
142
  export interface BlogItemsToMetadata {
104
143
  [key: string]: MetaData;
105
144
  }
@@ -121,3 +160,4 @@ export declare type BlogMarkdownLoaderOptions = {
121
160
  sourceToPermalink: Record<string, string>;
122
161
  onBrokenMarkdownLink: (brokenMarkdownLink: BlogBrokenMarkdownLink) => void;
123
162
  };
163
+ export {};
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-content-blog",
3
- "version": "2.0.0-beta.0e652730d",
3
+ "version": "2.0.0-beta.10",
4
4
  "description": "Blog plugin for Docusaurus.",
5
5
  "main": "lib/index.js",
6
- "types": "index.d.ts",
6
+ "types": "src/plugin-content-blog.d.ts",
7
7
  "scripts": {
8
8
  "build": "tsc",
9
9
  "watch": "tsc --watch"
@@ -18,28 +18,34 @@
18
18
  },
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
- "@docusaurus/core": "2.0.0-beta.0e652730d",
22
- "@docusaurus/mdx-loader": "2.0.0-beta.0e652730d",
23
- "@docusaurus/types": "2.0.0-beta.0e652730d",
24
- "@docusaurus/utils": "2.0.0-beta.0e652730d",
25
- "@docusaurus/utils-validation": "2.0.0-beta.0e652730d",
26
- "chalk": "^4.1.1",
21
+ "@docusaurus/mdx-loader": "2.0.0-beta.10",
22
+ "@docusaurus/utils": "2.0.0-beta.10",
23
+ "@docusaurus/utils-validation": "2.0.0-beta.10",
24
+ "chalk": "^4.1.2",
25
+ "escape-string-regexp": "^4.0.0",
27
26
  "feed": "^4.2.2",
28
27
  "fs-extra": "^10.0.0",
29
28
  "globby": "^11.0.2",
29
+ "js-yaml": "^4.0.0",
30
30
  "loader-utils": "^2.0.0",
31
31
  "lodash": "^4.17.20",
32
- "reading-time": "^1.3.0",
32
+ "reading-time": "^1.5.0",
33
33
  "remark-admonitions": "^1.2.1",
34
- "tslib": "^2.2.0",
35
- "webpack": "^5.37.0"
34
+ "tslib": "^2.3.1",
35
+ "utility-types": "^3.10.0",
36
+ "webpack": "^5.61.0"
37
+ },
38
+ "devDependencies": {
39
+ "@docusaurus/core": "2.0.0-beta.10",
40
+ "@docusaurus/types": "2.0.0-beta.10"
36
41
  },
37
42
  "peerDependencies": {
43
+ "@docusaurus/core": "2.0.0-beta.9",
38
44
  "react": "^16.8.4 || ^17.0.0",
39
45
  "react-dom": "^16.8.4 || ^17.0.0"
40
46
  },
41
47
  "engines": {
42
- "node": ">=12.13.0"
48
+ "node": ">=14"
43
49
  },
44
- "gitHead": "295893e14eedbbfad2eefb39ec5219404547fc31"
50
+ "gitHead": "6f4869af5721435d6995e63e2f24ac41646e34ea"
45
51
  }
@@ -0,0 +1,29 @@
1
+ {
2
+ "JMarcey": {
3
+ "name": "Joel Marcey",
4
+ "title": "Technical Lead & Developer Advocate at Facebook",
5
+ "url": "http://twitter.com/JoelMarcey",
6
+ "image_url": "https://github.com/JoelMarcey.png",
7
+ "twitter": "JoelMarcey"
8
+ },
9
+ "slorber": {
10
+ "name": "Sébastien Lorber",
11
+ "title": "Docusaurus maintainer",
12
+ "url": "https://sebastienlorber.com",
13
+ "image_url": "https://github.com/slorber.png",
14
+ "twitter": "sebastienlorber"
15
+ },
16
+ "yangshun": {
17
+ "name": "Yangshun Tay",
18
+ "title": "Front End Engineer at Facebook",
19
+ "url": "https://github.com/yangshun",
20
+ "image_url": "https://github.com/yangshun.png",
21
+ "twitter": "yangshunz"
22
+ },
23
+ "lex111": {
24
+ "name": "Alexey Pyltsyn",
25
+ "title": "Open-source enthusiast",
26
+ "url": "https://github.com/lex111",
27
+ "image_url": "https://github.com/lex111.png"
28
+ }
29
+ }
@@ -0,0 +1,27 @@
1
+
2
+ JMarcey:
3
+ name: Joel Marcey
4
+ title: Technical Lead & Developer Advocate at Facebook
5
+ url: http://twitter.com/JoelMarcey
6
+ image_url: https://github.com/JoelMarcey.png
7
+ twitter: JoelMarcey
8
+
9
+ slorber:
10
+ name: Sébastien Lorber
11
+ title: Docusaurus maintainer
12
+ url: https://sebastienlorber.com
13
+ image_url: https://github.com/slorber.png
14
+ twitter: sebastienlorber
15
+
16
+ yangshun:
17
+ name: Yangshun Tay
18
+ title: Front End Engineer at Facebook
19
+ url: https://github.com/yangshun
20
+ image_url: https://github.com/yangshun.png
21
+ twitter: yangshunz
22
+
23
+ lex111:
24
+ name: Alexey Pyltsyn
25
+ title: Open-source enthusiast
26
+ url: https://github.com/lex111
27
+ image_url: https://github.com/lex111.png
@@ -0,0 +1,5 @@
1
+ {
2
+ "slorber": {
3
+ "title": "Docusaurus maintainer"
4
+ }
5
+ }
@@ -0,0 +1,3 @@
1
+
2
+ slorber:
3
+ title: Docusaurus maintainer
@@ -0,0 +1,3 @@
1
+ {
2
+ "name": "Sébastien Lorber"
3
+ }
@@ -0,0 +1,2 @@
1
+
2
+ name: Sébastien Lorber
@@ -0,0 +1,8 @@
1
+ [
2
+ {
3
+ "name": "Sébastien Lorber"
4
+ },
5
+ {
6
+ "name": "Joel Marcey"
7
+ }
8
+ ]
@@ -0,0 +1,3 @@
1
+
2
+ - name: Sébastien Lorber
3
+ - name: Joel Marcey
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+
3
+ export const Typography: React.FC = (props) => {
4
+ return <p>{props.children}</p>
5
+ }
6
+ Typography.displayName = 'Typography'
@@ -1,5 +1,8 @@
1
1
  ---
2
2
  title: Happy 1st Birthday Slash!
3
+ authors:
4
+ - name: Yangshun Tay
5
+ - slorber
3
6
  ---
4
7
 
5
8
  Happy birthday!
@@ -0,0 +1,3 @@
1
+ This is a partial in file/folder starting with _:
2
+
3
+ It should be excluded by default
@@ -0,0 +1,3 @@
1
+ This is a partial in file/folder starting with _:
2
+
3
+ It should be excluded by default
@@ -0,0 +1,3 @@
1
+ This is a partial in file/folder starting with \_:
2
+
3
+ It should be excluded by default
@@ -0,0 +1,4 @@
1
+
2
+ slorber:
3
+ name: Sébastien Lorber
4
+ title: Docusaurus maintainer
@@ -0,0 +1,36 @@
1
+ ---
2
+ title: Full Blog Sample
3
+ date: 2021-03-05
4
+ ---
5
+
6
+ <h1>HTML Heading 1</h1>
7
+ <h2>HTML Heading 2</h2>
8
+ <p>HTML Paragraph</p>
9
+
10
+ import Typography from '../../component/Typography'
11
+
12
+ <Typography>Import DOM</Typography>
13
+
14
+ # Heading 1
15
+
16
+ ## Heading 2
17
+
18
+ ### Heading 3
19
+
20
+ #### Heading 4
21
+
22
+ ##### Heading 5
23
+
24
+ - list1
25
+ - list2
26
+ - list3
27
+
28
+
29
+ * list1
30
+ * list2
31
+ * list3
32
+
33
+ Normal Text *Italics Text* **Bold Text**
34
+
35
+ [link](https://v2.docusaurus.io/)
36
+ ![image](https://v2.docusaurus.io/)
@@ -0,0 +1,14 @@
1
+ ---
2
+ title: MDX Blog Sample with require calls
3
+ date: 2021-03-06
4
+ ---
5
+
6
+ Test MDX with require calls
7
+
8
+ import useBaseUrl from '@docusaurus/useBaseUrl';
9
+
10
+ <img src={useBaseUrl('/img/docusaurus.png')} />
11
+
12
+ <img src={require('../static/img/docusaurus.png').default} />
13
+
14
+ <img src={require('@site/static/img/docusaurus.png').default} />
@@ -2,6 +2,10 @@
2
2
  slug: /simple/slug
3
3
  title: Simple Slug
4
4
  date: 2020-08-15
5
+
6
+ author: Sébastien Lorber
7
+ author_title: Docusaurus maintainer
8
+ author_url: https://sebastienlorber.com
5
9
  ---
6
10
 
7
11
  simple url slug
@@ -1,5 +1,8 @@
1
1
  ---
2
2
  title: Happy 1st Birthday Slash! (translated)
3
+ authors:
4
+ - name: Yangshun Tay (translated)
5
+ - slorber
3
6
  ---
4
7
 
5
8
  Happy birthday! (translated)
@@ -0,0 +1,5 @@
1
+
2
+
3
+ slorber:
4
+ name: Sébastien Lorber (translated)
5
+ title: Docusaurus maintainer (translated)
@@ -0,0 +1,164 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`blogFeed atom shows feed item for each post 1`] = `
4
+ "<?xml version=\\"1.0\\" encoding=\\"utf-8\\"?>
5
+ <feed xmlns=\\"http://www.w3.org/2005/Atom\\">
6
+ <id>https://docusaurus.io/myBaseUrl/blog</id>
7
+ <title>Hello Blog</title>
8
+ <updated>2021-03-06T00:00:00.000Z</updated>
9
+ <generator>https://github.com/jpmonette/feed</generator>
10
+ <link rel=\\"alternate\\" href=\\"https://docusaurus.io/myBaseUrl/blog\\"/>
11
+ <subtitle>Hello Blog</subtitle>
12
+ <icon>https://docusaurus.io/myBaseUrl/image/favicon.ico</icon>
13
+ <rights>Copyright</rights>
14
+ <entry>
15
+ <title type=\\"html\\"><![CDATA[MDX Blog Sample with require calls]]></title>
16
+ <id>/mdx-require-blog-post</id>
17
+ <link href=\\"https://docusaurus.io/myBaseUrl/blog/mdx-require-blog-post\\"/>
18
+ <updated>2021-03-06T00:00:00.000Z</updated>
19
+ <summary type=\\"html\\"><![CDATA[Test MDX with require calls]]></summary>
20
+ </entry>
21
+ <entry>
22
+ <title type=\\"html\\"><![CDATA[Full Blog Sample]]></title>
23
+ <id>/mdx-blog-post</id>
24
+ <link href=\\"https://docusaurus.io/myBaseUrl/blog/mdx-blog-post\\"/>
25
+ <updated>2021-03-05T00:00:00.000Z</updated>
26
+ <summary type=\\"html\\"><![CDATA[HTML Heading 1]]></summary>
27
+ <content type=\\"html\\"><![CDATA[<h1>HTML Heading 1</h1><h2>HTML Heading 2</h2><p>HTML Paragraph</p><div>Import DOM</div><h1>Heading 1</h1><h2>Heading 2</h2><h3>Heading 3</h3><h4>Heading 4</h4><h5>Heading 5</h5><ul><li>list1</li><li>list2</li><li>list3</li></ul><ul><li>list1</li><li>list2</li><li>list3</li></ul><p>Normal Text <em>Italics Text</em> <strong>Bold Text</strong></p><p><a href=\\"https://v2.docusaurus.io/\\">link</a>
28
+ <img src=\\"https://v2.docusaurus.io/\\" alt=\\"image\\"/></p>]]></content>
29
+ </entry>
30
+ <entry>
31
+ <title type=\\"html\\"><![CDATA[Complex Slug]]></title>
32
+ <id>/hey/my super path/héllô</id>
33
+ <link href=\\"https://docusaurus.io/myBaseUrl/blog/hey/my super path/héllô\\"/>
34
+ <updated>2020-08-16T00:00:00.000Z</updated>
35
+ <summary type=\\"html\\"><![CDATA[complex url slug]]></summary>
36
+ <content type=\\"html\\"><![CDATA[<p>complex url slug</p>]]></content>
37
+ </entry>
38
+ <entry>
39
+ <title type=\\"html\\"><![CDATA[Simple Slug]]></title>
40
+ <id>/simple/slug</id>
41
+ <link href=\\"https://docusaurus.io/myBaseUrl/blog/simple/slug\\"/>
42
+ <updated>2020-08-15T00:00:00.000Z</updated>
43
+ <summary type=\\"html\\"><![CDATA[simple url slug]]></summary>
44
+ <content type=\\"html\\"><![CDATA[<p>simple url slug</p>]]></content>
45
+ <author>
46
+ <name>Sébastien Lorber</name>
47
+ <uri>https://sebastienlorber.com</uri>
48
+ </author>
49
+ </entry>
50
+ <entry>
51
+ <title type=\\"html\\"><![CDATA[draft]]></title>
52
+ <id>/draft</id>
53
+ <link href=\\"https://docusaurus.io/myBaseUrl/blog/draft\\"/>
54
+ <updated>2020-02-27T00:00:00.000Z</updated>
55
+ <summary type=\\"html\\"><![CDATA[this post should not be published yet]]></summary>
56
+ <content type=\\"html\\"><![CDATA[<p>this post should not be published yet</p>]]></content>
57
+ </entry>
58
+ <entry>
59
+ <title type=\\"html\\"><![CDATA[some heading]]></title>
60
+ <id>/heading-as-title</id>
61
+ <link href=\\"https://docusaurus.io/myBaseUrl/blog/heading-as-title\\"/>
62
+ <updated>2019-01-02T00:00:00.000Z</updated>
63
+ </entry>
64
+ <entry>
65
+ <title type=\\"html\\"><![CDATA[date-matter]]></title>
66
+ <id>/date-matter</id>
67
+ <link href=\\"https://docusaurus.io/myBaseUrl/blog/date-matter\\"/>
68
+ <updated>2019-01-01T00:00:00.000Z</updated>
69
+ <summary type=\\"html\\"><![CDATA[date inside front matter]]></summary>
70
+ <content type=\\"html\\"><![CDATA[<p>date inside front matter</p>]]></content>
71
+ </entry>
72
+ <entry>
73
+ <title type=\\"html\\"><![CDATA[Happy 1st Birthday Slash! (translated)]]></title>
74
+ <id>/2018/12/14/Happy-First-Birthday-Slash</id>
75
+ <link href=\\"https://docusaurus.io/myBaseUrl/blog/2018/12/14/Happy-First-Birthday-Slash\\"/>
76
+ <updated>2018-12-14T00:00:00.000Z</updated>
77
+ <summary type=\\"html\\"><![CDATA[Happy birthday! (translated)]]></summary>
78
+ <content type=\\"html\\"><![CDATA[<p>Happy birthday! (translated)</p>]]></content>
79
+ <author>
80
+ <name>Yangshun Tay (translated)</name>
81
+ </author>
82
+ <author>
83
+ <name>Sébastien Lorber (translated)</name>
84
+ </author>
85
+ </entry>
86
+ </feed>"
87
+ `;
88
+
89
+ exports[`blogFeed rss shows feed item for each post 1`] = `
90
+ "<?xml version=\\"1.0\\" encoding=\\"utf-8\\"?>
91
+ <rss version=\\"2.0\\" xmlns:dc=\\"http://purl.org/dc/elements/1.1/\\" xmlns:content=\\"http://purl.org/rss/1.0/modules/content/\\">
92
+ <channel>
93
+ <title>Hello Blog</title>
94
+ <link>https://docusaurus.io/myBaseUrl/blog</link>
95
+ <description>Hello Blog</description>
96
+ <lastBuildDate>Sat, 06 Mar 2021 00:00:00 GMT</lastBuildDate>
97
+ <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
98
+ <generator>https://github.com/jpmonette/feed</generator>
99
+ <copyright>Copyright</copyright>
100
+ <item>
101
+ <title><![CDATA[MDX Blog Sample with require calls]]></title>
102
+ <link>https://docusaurus.io/myBaseUrl/blog/mdx-require-blog-post</link>
103
+ <guid>/mdx-require-blog-post</guid>
104
+ <pubDate>Sat, 06 Mar 2021 00:00:00 GMT</pubDate>
105
+ <description><![CDATA[Test MDX with require calls]]></description>
106
+ </item>
107
+ <item>
108
+ <title><![CDATA[Full Blog Sample]]></title>
109
+ <link>https://docusaurus.io/myBaseUrl/blog/mdx-blog-post</link>
110
+ <guid>/mdx-blog-post</guid>
111
+ <pubDate>Fri, 05 Mar 2021 00:00:00 GMT</pubDate>
112
+ <description><![CDATA[HTML Heading 1]]></description>
113
+ <content:encoded><![CDATA[<h1>HTML Heading 1</h1><h2>HTML Heading 2</h2><p>HTML Paragraph</p><div>Import DOM</div><h1>Heading 1</h1><h2>Heading 2</h2><h3>Heading 3</h3><h4>Heading 4</h4><h5>Heading 5</h5><ul><li>list1</li><li>list2</li><li>list3</li></ul><ul><li>list1</li><li>list2</li><li>list3</li></ul><p>Normal Text <em>Italics Text</em> <strong>Bold Text</strong></p><p><a href=\\"https://v2.docusaurus.io/\\">link</a>
114
+ <img src=\\"https://v2.docusaurus.io/\\" alt=\\"image\\"/></p>]]></content:encoded>
115
+ </item>
116
+ <item>
117
+ <title><![CDATA[Complex Slug]]></title>
118
+ <link>https://docusaurus.io/myBaseUrl/blog/hey/my super path/héllô</link>
119
+ <guid>/hey/my super path/héllô</guid>
120
+ <pubDate>Sun, 16 Aug 2020 00:00:00 GMT</pubDate>
121
+ <description><![CDATA[complex url slug]]></description>
122
+ <content:encoded><![CDATA[<p>complex url slug</p>]]></content:encoded>
123
+ </item>
124
+ <item>
125
+ <title><![CDATA[Simple Slug]]></title>
126
+ <link>https://docusaurus.io/myBaseUrl/blog/simple/slug</link>
127
+ <guid>/simple/slug</guid>
128
+ <pubDate>Sat, 15 Aug 2020 00:00:00 GMT</pubDate>
129
+ <description><![CDATA[simple url slug]]></description>
130
+ <content:encoded><![CDATA[<p>simple url slug</p>]]></content:encoded>
131
+ </item>
132
+ <item>
133
+ <title><![CDATA[draft]]></title>
134
+ <link>https://docusaurus.io/myBaseUrl/blog/draft</link>
135
+ <guid>/draft</guid>
136
+ <pubDate>Thu, 27 Feb 2020 00:00:00 GMT</pubDate>
137
+ <description><![CDATA[this post should not be published yet]]></description>
138
+ <content:encoded><![CDATA[<p>this post should not be published yet</p>]]></content:encoded>
139
+ </item>
140
+ <item>
141
+ <title><![CDATA[some heading]]></title>
142
+ <link>https://docusaurus.io/myBaseUrl/blog/heading-as-title</link>
143
+ <guid>/heading-as-title</guid>
144
+ <pubDate>Wed, 02 Jan 2019 00:00:00 GMT</pubDate>
145
+ </item>
146
+ <item>
147
+ <title><![CDATA[date-matter]]></title>
148
+ <link>https://docusaurus.io/myBaseUrl/blog/date-matter</link>
149
+ <guid>/date-matter</guid>
150
+ <pubDate>Tue, 01 Jan 2019 00:00:00 GMT</pubDate>
151
+ <description><![CDATA[date inside front matter]]></description>
152
+ <content:encoded><![CDATA[<p>date inside front matter</p>]]></content:encoded>
153
+ </item>
154
+ <item>
155
+ <title><![CDATA[Happy 1st Birthday Slash! (translated)]]></title>
156
+ <link>https://docusaurus.io/myBaseUrl/blog/2018/12/14/Happy-First-Birthday-Slash</link>
157
+ <guid>/2018/12/14/Happy-First-Birthday-Slash</guid>
158
+ <pubDate>Fri, 14 Dec 2018 00:00:00 GMT</pubDate>
159
+ <description><![CDATA[Happy birthday! (translated)]]></description>
160
+ <content:encoded><![CDATA[<p>Happy birthday! (translated)</p>]]></content:encoded>
161
+ </item>
162
+ </channel>
163
+ </rss>"
164
+ `;