@docusaurus/plugin-content-blog 3.1.0 → 3.2.0

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 (50) hide show
  1. package/lib/blogUtils.d.ts +7 -1
  2. package/lib/blogUtils.js +15 -21
  3. package/lib/client/index.d.ts +8 -0
  4. package/lib/client/index.js +15 -0
  5. package/lib/feed.js +11 -5
  6. package/lib/frontMatter.d.ts +0 -6
  7. package/lib/frontMatter.js +3 -2
  8. package/lib/index.js +25 -5
  9. package/lib/options.js +10 -0
  10. package/package.json +26 -11
  11. package/src/blogUtils.ts +31 -27
  12. package/src/client/index.ts +20 -0
  13. package/src/feed.ts +22 -7
  14. package/src/frontMatter.ts +5 -4
  15. package/src/index.ts +42 -5
  16. package/src/options.ts +12 -0
  17. package/src/plugin-content-blog.d.ts +66 -8
  18. package/.docusaurus/DONT-EDIT-THIS-FOLDER +0 -5
  19. package/.docusaurus/client-modules.js +0 -5
  20. package/.docusaurus/codeTranslations.json +0 -1
  21. package/.docusaurus/docusaurus-plugin-content-blog/default/blog-only-aeb.json +0 -10
  22. package/.docusaurus/docusaurus-plugin-content-blog/default/blog-only-archive-245.json +0 -312
  23. package/.docusaurus/docusaurus-plugin-content-blog/default/blog-only-page-2-d48.json +0 -11
  24. package/.docusaurus/docusaurus-plugin-content-blog/default/blog-only-page-3-8b6.json +0 -10
  25. package/.docusaurus/docusaurus-plugin-content-blog/default/blog-only-tags-birthday-c96-list.json +0 -9
  26. package/.docusaurus/docusaurus-plugin-content-blog/default/blog-only-tags-birthday-c96.json +0 -7
  27. package/.docusaurus/docusaurus-plugin-content-blog/default/blog-only-tags-complex-cf3-list.json +0 -9
  28. package/.docusaurus/docusaurus-plugin-content-blog/default/blog-only-tags-complex-cf3.json +0 -7
  29. package/.docusaurus/docusaurus-plugin-content-blog/default/blog-only-tags-date-c24-list.json +0 -9
  30. package/.docusaurus/docusaurus-plugin-content-blog/default/blog-only-tags-date-c24.json +0 -7
  31. package/.docusaurus/docusaurus-plugin-content-blog/default/blog-only-tags-tags-344.json +0 -17
  32. package/.docusaurus/docusaurus-plugin-content-blog/default/blog-post-list-prop-default.json +0 -30
  33. package/.docusaurus/docusaurus-plugin-content-blog/default/plugin-route-context-module-100.json +0 -4
  34. package/.docusaurus/docusaurus-plugin-content-blog/default/site-src-tests-fixtures-website-blog-2018-12-14-happy-first-birthday-slash-md-d1e.json +0 -46
  35. package/.docusaurus/docusaurus-plugin-content-blog/default/site-src-tests-fixtures-website-blog-blog-with-links-mdx-fe5.json +0 -22
  36. package/.docusaurus/docusaurus-plugin-content-blog/default/site-src-tests-fixtures-website-blog-complex-slug-md-314.json +0 -40
  37. package/.docusaurus/docusaurus-plugin-content-blog/default/site-src-tests-fixtures-website-blog-date-matter-md-191.json +0 -33
  38. package/.docusaurus/docusaurus-plugin-content-blog/default/site-src-tests-fixtures-website-blog-heading-as-title-md-10c.json +0 -25
  39. package/.docusaurus/docusaurus-plugin-content-blog/default/site-src-tests-fixtures-website-blog-mdx-blog-post-mdx-025.json +0 -26
  40. package/.docusaurus/docusaurus-plugin-content-blog/default/site-src-tests-fixtures-website-blog-mdx-require-blog-post-mdx-4ba.json +0 -26
  41. package/.docusaurus/docusaurus-plugin-content-blog/default/site-src-tests-fixtures-website-blog-simple-slug-md-324.json +0 -36
  42. package/.docusaurus/docusaurus-plugin-content-blog/default/site-src-tests-fixtures-website-blog-unlisted-md-5cb.json +0 -18
  43. package/.docusaurus/docusaurus-theme-search-algolia/default/plugin-route-context-module-100.json +0 -4
  44. package/.docusaurus/docusaurus.config.mjs +0 -246
  45. package/.docusaurus/globalData.json +0 -1
  46. package/.docusaurus/i18n.json +0 -17
  47. package/.docusaurus/registry.js +0 -38
  48. package/.docusaurus/routes.js +0 -99
  49. package/.docusaurus/routesChunkNames.json +0 -194
  50. package/.docusaurus/site-metadata.json +0 -24
package/src/index.ts CHANGED
@@ -11,6 +11,7 @@ import {
11
11
  normalizeUrl,
12
12
  docuHash,
13
13
  aliasedSitePath,
14
+ aliasedSitePathToRelativePath,
14
15
  getPluginI18nPath,
15
16
  posixPath,
16
17
  addTrailingPathSeparator,
@@ -20,11 +21,12 @@ import {
20
21
  DEFAULT_PLUGIN_ID,
21
22
  } from '@docusaurus/utils';
22
23
  import {
23
- generateBlogPosts,
24
24
  getSourceToPermalink,
25
25
  getBlogTags,
26
26
  paginateBlogPosts,
27
27
  shouldBeListed,
28
+ applyProcessBlogPosts,
29
+ generateBlogPosts,
28
30
  } from './blogUtils';
29
31
  import footnoteIDFixer from './remark/footnoteIDFixer';
30
32
  import {translateContent, getTranslationFiles} from './translations';
@@ -32,7 +34,12 @@ import {createBlogFeedFiles} from './feed';
32
34
 
33
35
  import {toTagProp, toTagsProp} from './props';
34
36
  import type {BlogContentPaths, BlogMarkdownLoaderOptions} from './types';
35
- import type {LoadContext, Plugin, HtmlTags} from '@docusaurus/types';
37
+ import type {
38
+ LoadContext,
39
+ Plugin,
40
+ HtmlTags,
41
+ RouteMetadata,
42
+ } from '@docusaurus/types';
36
43
  import type {
37
44
  PluginOptions,
38
45
  BlogPostFrontMatter,
@@ -42,6 +49,7 @@ import type {
42
49
  BlogTags,
43
50
  BlogContent,
44
51
  BlogPaginated,
52
+ BlogMetadata,
45
53
  } from '@docusaurus/plugin-content-blog';
46
54
 
47
55
  export default async function pluginContentBlog(
@@ -107,11 +115,16 @@ export default async function pluginContentBlog(
107
115
  blogDescription,
108
116
  blogTitle,
109
117
  blogSidebarTitle,
118
+ pageBasePath,
110
119
  } = options;
111
120
 
112
121
  const baseBlogUrl = normalizeUrl([baseUrl, routeBasePath]);
113
122
  const blogTagsListPath = normalizeUrl([baseBlogUrl, tagsBasePath]);
114
- const blogPosts = await generateBlogPosts(contentPaths, context, options);
123
+ let blogPosts = await generateBlogPosts(contentPaths, context, options);
124
+ blogPosts = await applyProcessBlogPosts({
125
+ blogPosts,
126
+ processBlogPosts: options.processBlogPosts,
127
+ });
115
128
  const listedBlogPosts = blogPosts.filter(shouldBeListed);
116
129
 
117
130
  if (!blogPosts.length) {
@@ -121,11 +134,10 @@ export default async function pluginContentBlog(
121
134
  blogListPaginated: [],
122
135
  blogTags: {},
123
136
  blogTagsListPath,
124
- blogTagsPaginated: [],
125
137
  };
126
138
  }
127
139
 
128
- // Colocate next and prev metadata.
140
+ // Collocate next and prev metadata.
129
141
  listedBlogPosts.forEach((blogPost, index) => {
130
142
  const prevItem = index > 0 ? listedBlogPosts[index - 1] : null;
131
143
  if (prevItem) {
@@ -153,6 +165,7 @@ export default async function pluginContentBlog(
153
165
  blogDescription,
154
166
  postsPerPageOption,
155
167
  basePageUrl: baseBlogUrl,
168
+ pageBasePath,
156
169
  });
157
170
 
158
171
  const blogTags: BlogTags = getBlogTags({
@@ -160,6 +173,7 @@ export default async function pluginContentBlog(
160
173
  postsPerPageOption,
161
174
  blogDescription,
162
175
  blogTitle,
176
+ pageBasePath,
163
177
  });
164
178
 
165
179
  return {
@@ -180,6 +194,7 @@ export default async function pluginContentBlog(
180
194
  blogArchiveComponent,
181
195
  routeBasePath,
182
196
  archiveBasePath,
197
+ blogTitle,
183
198
  } = options;
184
199
 
185
200
  const {addRoute, createData} = actions;
@@ -255,6 +270,24 @@ export default async function pluginContentBlog(
255
270
  ),
256
271
  );
257
272
 
273
+ const blogMetadata: BlogMetadata = {
274
+ blogBasePath: normalizeUrl([baseUrl, routeBasePath]),
275
+ blogTitle,
276
+ };
277
+ const blogMetadataPath = await createData(
278
+ `blogMetadata-${pluginId}.json`,
279
+ JSON.stringify(blogMetadata, null, 2),
280
+ );
281
+
282
+ function createBlogPostRouteMetadata(
283
+ blogPostMeta: BlogPostMetadata,
284
+ ): RouteMetadata {
285
+ return {
286
+ sourceFilePath: aliasedSitePathToRelativePath(blogPostMeta.source),
287
+ lastUpdatedAt: blogPostMeta.lastUpdatedAt,
288
+ };
289
+ }
290
+
258
291
  // Create routes for blog entries.
259
292
  await Promise.all(
260
293
  blogPosts.map(async (blogPost) => {
@@ -274,6 +307,10 @@ export default async function pluginContentBlog(
274
307
  sidebar: aliasedSource(sidebarProp),
275
308
  content: metadata.source,
276
309
  },
310
+ metadata: createBlogPostRouteMetadata(metadata),
311
+ context: {
312
+ blogMetadata: aliasedSource(blogMetadataPath),
313
+ },
277
314
  });
278
315
 
279
316
  blogItemsToMetadata[id] = metadata;
package/src/options.ts CHANGED
@@ -45,11 +45,15 @@ export const DEFAULT_OPTIONS: PluginOptions = {
45
45
  routeBasePath: 'blog',
46
46
  tagsBasePath: 'tags',
47
47
  archiveBasePath: 'archive',
48
+ pageBasePath: 'page',
48
49
  path: 'blog',
49
50
  editLocalizedFiles: false,
50
51
  authorsMapPath: 'authors.yml',
51
52
  readingTime: ({content, defaultReadingTime}) => defaultReadingTime({content}),
52
53
  sortPosts: 'descending',
54
+ showLastUpdateTime: false,
55
+ showLastUpdateAuthor: false,
56
+ processBlogPosts: async () => undefined,
53
57
  };
54
58
 
55
59
  const PluginOptionSchema = Joi.object<PluginOptions>({
@@ -59,6 +63,7 @@ const PluginOptionSchema = Joi.object<PluginOptions>({
59
63
  .allow(null),
60
64
  routeBasePath: RouteBasePathSchema.default(DEFAULT_OPTIONS.routeBasePath),
61
65
  tagsBasePath: Joi.string().default(DEFAULT_OPTIONS.tagsBasePath),
66
+ pageBasePath: Joi.string().default(DEFAULT_OPTIONS.pageBasePath),
62
67
  include: Joi.array().items(Joi.string()).default(DEFAULT_OPTIONS.include),
63
68
  exclude: Joi.array().items(Joi.string()).default(DEFAULT_OPTIONS.exclude),
64
69
  postsPerPage: Joi.alternatives()
@@ -132,6 +137,13 @@ const PluginOptionSchema = Joi.object<PluginOptions>({
132
137
  sortPosts: Joi.string()
133
138
  .valid('descending', 'ascending')
134
139
  .default(DEFAULT_OPTIONS.sortPosts),
140
+ showLastUpdateTime: Joi.bool().default(DEFAULT_OPTIONS.showLastUpdateTime),
141
+ showLastUpdateAuthor: Joi.bool().default(
142
+ DEFAULT_OPTIONS.showLastUpdateAuthor,
143
+ ),
144
+ processBlogPosts: Joi.function()
145
+ .optional()
146
+ .default(() => DEFAULT_OPTIONS.processBlogPosts),
135
147
  }).default(DEFAULT_OPTIONS);
136
148
 
137
149
  export function validateOptions({
@@ -5,10 +5,17 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+ /// <reference types="@docusaurus/module-type-aliases" />
9
+
8
10
  declare module '@docusaurus/plugin-content-blog' {
9
11
  import type {LoadedMDXContent} from '@docusaurus/mdx-loader';
10
12
  import type {MDXOptions} from '@docusaurus/mdx-loader';
11
- import type {FrontMatterTag, Tag} from '@docusaurus/utils';
13
+ import type {
14
+ FrontMatterTag,
15
+ Tag,
16
+ LastUpdateData,
17
+ FrontMatterLastUpdate,
18
+ } from '@docusaurus/utils';
12
19
  import type {DocusaurusConfig, Plugin, LoadContext} from '@docusaurus/types';
13
20
  import type {Item as FeedItem} from 'feed';
14
21
  import type {Overwrite} from 'utility-types';
@@ -154,6 +161,8 @@ yarn workspace v1.22.19image` is a collocated image path, this entry will be the
154
161
  toc_min_heading_level?: number;
155
162
  /** Maximum TOC heading level. Must be between 2 and 6. */
156
163
  toc_max_heading_level?: number;
164
+ /** Allows overriding the last updated author and/or date. */
165
+ last_update?: FrontMatterLastUpdate;
157
166
  };
158
167
 
159
168
  export type BlogPostFrontMatterAuthor = Author & {
@@ -178,7 +187,7 @@ yarn workspace v1.22.19image` is a collocated image path, this entry will be the
178
187
  | BlogPostFrontMatterAuthor
179
188
  | (string | BlogPostFrontMatterAuthor)[];
180
189
 
181
- export type BlogPostMetadata = {
190
+ export type BlogPostMetadata = LastUpdateData & {
182
191
  /** Path to the Markdown source, with `@site` alias. */
183
192
  readonly source: string;
184
193
  /**
@@ -190,11 +199,6 @@ yarn workspace v1.22.19image` is a collocated image path, this entry will be the
190
199
  * into a string.
191
200
  */
192
201
  readonly date: Date;
193
- /**
194
- * Publish date formatted according to the locale, so that the client can
195
- * render the date regardless of the existence of `Intl.DateTimeFormat`.
196
- */
197
- readonly formattedDate: string;
198
202
  /** Full link including base URL. */
199
203
  readonly permalink: string;
200
204
  /**
@@ -333,6 +337,11 @@ yarn workspace v1.22.19image` is a collocated image path, this entry will be the
333
337
  defaultReadingTime: ReadingTimeFunction;
334
338
  },
335
339
  ) => number | undefined;
340
+
341
+ export type ProcessBlogPostsFn = (params: {
342
+ blogPosts: BlogPost[];
343
+ }) => Promise<void | BlogPost[]>;
344
+
336
345
  /**
337
346
  * Plugin options after normalization.
338
347
  */
@@ -351,9 +360,14 @@ yarn workspace v1.22.19image` is a collocated image path, this entry will be the
351
360
  routeBasePath: string;
352
361
  /**
353
362
  * URL route for the tags section of your blog. Will be appended to
354
- * `routeBasePath`. **DO NOT** include a trailing slash.
363
+ * `routeBasePath`.
355
364
  */
356
365
  tagsBasePath: string;
366
+ /**
367
+ * URL route for the pages section of your blog. Will be appended to
368
+ * `routeBasePath`.
369
+ */
370
+ pageBasePath: string;
357
371
  /**
358
372
  * URL route for the archive section of your blog. Will be appended to
359
373
  * `routeBasePath`. **DO NOT** include a trailing slash. Use `null` to
@@ -419,6 +433,14 @@ yarn workspace v1.22.19image` is a collocated image path, this entry will be the
419
433
  readingTime: ReadingTimeFunctionOption;
420
434
  /** Governs the direction of blog post sorting. */
421
435
  sortPosts: 'ascending' | 'descending';
436
+ /** Whether to display the last date the doc was updated. */
437
+ showLastUpdateTime: boolean;
438
+ /** Whether to display the author who last updated the doc. */
439
+ showLastUpdateAuthor: boolean;
440
+ /** An optional function which can be used to transform blog posts
441
+ * (filter, modify, delete, etc...).
442
+ */
443
+ processBlogPosts: ProcessBlogPostsFn;
422
444
  };
423
445
 
424
446
  /**
@@ -461,6 +483,13 @@ yarn workspace v1.22.19image` is a collocated image path, this entry will be the
461
483
  blogTagsListPath: string;
462
484
  };
463
485
 
486
+ export type BlogMetadata = {
487
+ /** the path to the base of the blog */
488
+ blogBasePath: string;
489
+ /** title of the overall blog */
490
+ blogTitle: string;
491
+ };
492
+
464
493
  export type BlogTags = {
465
494
  [permalink: string]: BlogTag;
466
495
  };
@@ -532,6 +561,7 @@ declare module '@theme/BlogPostPage' {
532
561
  BlogPostFrontMatter,
533
562
  BlogSidebar,
534
563
  PropBlogPostContent,
564
+ BlogMetadata,
535
565
  } from '@docusaurus/plugin-content-blog';
536
566
 
537
567
  export type FrontMatter = BlogPostFrontMatter;
@@ -543,6 +573,8 @@ declare module '@theme/BlogPostPage' {
543
573
  readonly sidebar: BlogSidebar;
544
574
  /** Content of this post as an MDX component, with useful metadata. */
545
575
  readonly content: Content;
576
+ /** Metadata about the blog. */
577
+ readonly blogMetadata: BlogMetadata;
546
578
  }
547
579
 
548
580
  export default function BlogPostPage(props: Props): JSX.Element;
@@ -552,6 +584,10 @@ declare module '@theme/BlogPostPage/Metadata' {
552
584
  export default function BlogPostPageMetadata(): JSX.Element;
553
585
  }
554
586
 
587
+ declare module '@theme/BlogPostPage/StructuredData' {
588
+ export default function BlogPostStructuredData(): JSX.Element;
589
+ }
590
+
555
591
  declare module '@theme/BlogListPage' {
556
592
  import type {Content} from '@theme/BlogPostPage';
557
593
  import type {
@@ -574,6 +610,28 @@ declare module '@theme/BlogListPage' {
574
610
  export default function BlogListPage(props: Props): JSX.Element;
575
611
  }
576
612
 
613
+ declare module '@theme/BlogListPage/StructuredData' {
614
+ import type {Content} from '@theme/BlogPostPage';
615
+ import type {
616
+ BlogSidebar,
617
+ BlogPaginatedMetadata,
618
+ } from '@docusaurus/plugin-content-blog';
619
+
620
+ export interface Props {
621
+ /** Blog sidebar. */
622
+ readonly sidebar: BlogSidebar;
623
+ /** Metadata of the current listing page. */
624
+ readonly metadata: BlogPaginatedMetadata;
625
+ /**
626
+ * Array of blog posts included on this page. Every post's metadata is also
627
+ * available.
628
+ */
629
+ readonly items: readonly {readonly content: Content}[];
630
+ }
631
+
632
+ export default function BlogListPageStructuredData(props: Props): JSX.Element;
633
+ }
634
+
577
635
  declare module '@theme/BlogTagsListPage' {
578
636
  import type {BlogSidebar} from '@docusaurus/plugin-content-blog';
579
637
  import type {TagsListItem} from '@docusaurus/utils';
@@ -1,5 +0,0 @@
1
- This folder stores temp files that Docusaurus' client bundler accesses.
2
-
3
- DO NOT hand-modify files in this folder because they will be overwritten in the
4
- next build. You can clear all build artifacts (including this folder) with the
5
- `docusaurus clear` command.
@@ -1,5 +0,0 @@
1
- export default [
2
- require("/Users/sebastienlorber/Desktop/projects/docusaurus/node_modules/infima/dist/css/default/default.css"),
3
- require("/Users/sebastienlorber/Desktop/projects/docusaurus/packages/docusaurus-theme-classic/lib/prism-include-languages"),
4
- require("/Users/sebastienlorber/Desktop/projects/docusaurus/packages/docusaurus-theme-classic/lib/nprogress"),
5
- ];
@@ -1 +0,0 @@
1
- {}
@@ -1,10 +0,0 @@
1
- {
2
- "permalink": "/blog-only/",
3
- "page": 1,
4
- "postsPerPage": 3,
5
- "totalPages": 3,
6
- "totalCount": 8,
7
- "nextPage": "/blog-only/page/2",
8
- "blogDescription": "Blog",
9
- "blogTitle": "Blog"
10
- }
@@ -1,312 +0,0 @@
1
- {
2
- "blogPosts": [
3
- {
4
- "id": "/blog-with-links",
5
- "metadata": {
6
- "permalink": "/blog-only/blog-with-links",
7
- "editUrl": "https://github.com/facebook/docusaurus/edit/main/website/src/__tests__/__fixtures__/website/blog/blog-with-links.mdx",
8
- "source": "@site/src/__tests__/__fixtures__/website/blog/blog-with-links.mdx",
9
- "title": "test links",
10
- "description": "absolute full url",
11
- "date": "2023-07-23T00:00:00.000Z",
12
- "formattedDate": "July 23, 2023",
13
- "tags": [],
14
- "readingTime": 0.145,
15
- "hasTruncateMarker": false,
16
- "authors": [],
17
- "frontMatter": {
18
- "title": "test links",
19
- "date": "2023-07-23T00:00:00.000Z"
20
- },
21
- "unlisted": false,
22
- "nextItem": {
23
- "title": "MDX Blog Sample with require calls",
24
- "permalink": "/blog-only/mdx-require-blog-post"
25
- }
26
- },
27
- "content": "import useBaseUrl from '@docusaurus/useBaseUrl';\n\n[absolute full url](https://github.com/facebook/docusaurus)\n\n[absolute url with implicit domain name](/blog/2017/12/14/introducing-docusaurus)\n\n[relative url](2017-12-14-introducing-docusaurus.mdx)\n\n[anchor](#title)\n\n![](/img/docusaurus-social-card.png)\n\n![](https://docusaurus.io/assets/images/slash-introducing-411a16dd05086935b8e9ddae38ae9b45.svg)\n\n<img\n srcSet={`${useBaseUrl(\n '/img/docusaurus-social-card.png 300w',\n )}, ${useBaseUrl('/img/docusaurus-social-card.png 500w')}`}\n/>\n\n<img src={useBaseUrl('/img/docusaurus-social-card.png')} />"
28
- },
29
- {
30
- "id": "/mdx-require-blog-post",
31
- "metadata": {
32
- "permalink": "/blog-only/mdx-require-blog-post",
33
- "editUrl": "https://github.com/facebook/docusaurus/edit/main/website/src/__tests__/__fixtures__/website/blog/mdx-require-blog-post.mdx",
34
- "source": "@site/src/__tests__/__fixtures__/website/blog/mdx-require-blog-post.mdx",
35
- "title": "MDX Blog Sample with require calls",
36
- "description": "Test MDX with require calls",
37
- "date": "2021-03-06T00:00:00.000Z",
38
- "formattedDate": "March 6, 2021",
39
- "tags": [],
40
- "readingTime": 0.09,
41
- "hasTruncateMarker": false,
42
- "authors": [],
43
- "frontMatter": {
44
- "title": "MDX Blog Sample with require calls",
45
- "date": "2021-03-06T00:00:00.000Z"
46
- },
47
- "unlisted": false,
48
- "prevItem": {
49
- "title": "test links",
50
- "permalink": "/blog-only/blog-with-links"
51
- },
52
- "nextItem": {
53
- "title": "Full Blog Sample",
54
- "permalink": "/blog-only/mdx-blog-post"
55
- }
56
- },
57
- "content": "Test MDX with require calls\n\nimport useBaseUrl from '@docusaurus/useBaseUrl';\n\n<img src={useBaseUrl('/img/docusaurus-social-card.png')} />\n\n<img src={require('../static/img/docusaurus-social-card.png').default} />\n\n<img src={require('@site/static/img/docusaurus-social-card.png').default} />"
58
- },
59
- {
60
- "id": "/mdx-blog-post",
61
- "metadata": {
62
- "permalink": "/blog-only/mdx-blog-post",
63
- "editUrl": "https://github.com/facebook/docusaurus/edit/main/website/src/__tests__/__fixtures__/website/blog/mdx-blog-post.mdx",
64
- "source": "@site/src/__tests__/__fixtures__/website/blog/mdx-blog-post.mdx",
65
- "title": "Full Blog Sample",
66
- "description": "HTML Heading 1",
67
- "date": "2021-03-05T00:00:00.000Z",
68
- "formattedDate": "March 5, 2021",
69
- "tags": [],
70
- "readingTime": 0.245,
71
- "hasTruncateMarker": false,
72
- "authors": [],
73
- "frontMatter": {
74
- "title": "Full Blog Sample",
75
- "date": "2021-03-05T00:00:00.000Z"
76
- },
77
- "unlisted": false,
78
- "prevItem": {
79
- "title": "MDX Blog Sample with require calls",
80
- "permalink": "/blog-only/mdx-require-blog-post"
81
- },
82
- "nextItem": {
83
- "title": "Complex Slug",
84
- "permalink": "/blog-only/hey/my super path/héllô"
85
- }
86
- },
87
- "content": "<h1>HTML Heading 1</h1>\n<h2>HTML Heading 2</h2>\n<p>HTML Paragraph</p>\n\nimport Typography from '@site/../component/Typography';\n\n<Typography>Import DOM</Typography>\n\n# Heading 1\n\n## Heading 2\n\n### Heading 3\n\n#### Heading 4\n\n##### Heading 5\n\n- list1\n- list2\n- list3\n\n* list1\n* list2\n* list3\n\nNormal Text _Italics Text_ **Bold Text**\n\n[link](https://v2.docusaurus.io/) ![image](https://v2.docusaurus.io/)"
88
- },
89
- {
90
- "id": "/hey/my super path/héllô",
91
- "metadata": {
92
- "permalink": "/blog-only/hey/my super path/héllô",
93
- "editUrl": "https://github.com/facebook/docusaurus/edit/main/website/src/__tests__/__fixtures__/website/blog/complex-slug.md",
94
- "source": "@site/src/__tests__/__fixtures__/website/blog/complex-slug.md",
95
- "title": "Complex Slug",
96
- "description": "complex url slug",
97
- "date": "2020-08-16T00:00:00.000Z",
98
- "formattedDate": "August 16, 2020",
99
- "tags": [
100
- {
101
- "label": "date",
102
- "permalink": "/blog-only/tags/date"
103
- },
104
- {
105
- "label": "complex",
106
- "permalink": "/blog-only/tags/complex"
107
- }
108
- ],
109
- "readingTime": 0.015,
110
- "hasTruncateMarker": false,
111
- "authors": [],
112
- "frontMatter": {
113
- "slug": "/hey/my super path/héllô",
114
- "title": "Complex Slug",
115
- "date": "2020/08/16",
116
- "tags": [
117
- "date",
118
- "complex"
119
- ]
120
- },
121
- "unlisted": false,
122
- "prevItem": {
123
- "title": "Full Blog Sample",
124
- "permalink": "/blog-only/mdx-blog-post"
125
- },
126
- "nextItem": {
127
- "title": "Simple Slug",
128
- "permalink": "/blog-only/simple/slug"
129
- }
130
- },
131
- "content": "complex url slug"
132
- },
133
- {
134
- "id": "/simple/slug",
135
- "metadata": {
136
- "permalink": "/blog-only/simple/slug",
137
- "editUrl": "https://github.com/facebook/docusaurus/edit/main/website/src/__tests__/__fixtures__/website/blog/simple-slug.md",
138
- "source": "@site/src/__tests__/__fixtures__/website/blog/simple-slug.md",
139
- "title": "Simple Slug",
140
- "description": "simple url slug",
141
- "date": "2020-08-15T00:00:00.000Z",
142
- "formattedDate": "August 15, 2020",
143
- "tags": [],
144
- "readingTime": 0.015,
145
- "hasTruncateMarker": false,
146
- "authors": [
147
- {
148
- "name": "Sébastien Lorber",
149
- "title": "Docusaurus maintainer",
150
- "url": "https://sebastienlorber.com"
151
- }
152
- ],
153
- "frontMatter": {
154
- "slug": "/simple/slug",
155
- "title": "Simple Slug",
156
- "date": "2020-08-15T00:00:00.000Z",
157
- "author": "Sébastien Lorber",
158
- "author_title": "Docusaurus maintainer",
159
- "author_url": "https://sebastienlorber.com"
160
- },
161
- "unlisted": false,
162
- "prevItem": {
163
- "title": "Complex Slug",
164
- "permalink": "/blog-only/hey/my super path/héllô"
165
- },
166
- "nextItem": {
167
- "title": "some heading",
168
- "permalink": "/blog-only/heading-as-title"
169
- }
170
- },
171
- "content": "simple url slug"
172
- },
173
- {
174
- "id": "/unlisted",
175
- "metadata": {
176
- "permalink": "/blog-only/unlisted",
177
- "editUrl": "https://github.com/facebook/docusaurus/edit/main/website/src/__tests__/__fixtures__/website/blog/unlisted.md",
178
- "source": "@site/src/__tests__/__fixtures__/website/blog/unlisted.md",
179
- "title": "unlisted",
180
- "description": "this post is unlisted",
181
- "date": "2020-02-27T00:00:00.000Z",
182
- "formattedDate": "February 27, 2020",
183
- "tags": [],
184
- "readingTime": 0.02,
185
- "hasTruncateMarker": false,
186
- "authors": [],
187
- "frontMatter": {
188
- "date": "2020-02-27T00:00:00.000Z",
189
- "unlisted": true
190
- },
191
- "unlisted": true
192
- },
193
- "content": "this post is unlisted"
194
- },
195
- {
196
- "id": "/heading-as-title",
197
- "metadata": {
198
- "permalink": "/blog-only/heading-as-title",
199
- "editUrl": "https://github.com/facebook/docusaurus/edit/main/website/src/__tests__/__fixtures__/website/blog/heading-as-title.md",
200
- "source": "@site/src/__tests__/__fixtures__/website/blog/heading-as-title.md",
201
- "title": "some heading",
202
- "description": "",
203
- "date": "2019-01-02T00:00:00.000Z",
204
- "formattedDate": "January 2, 2019",
205
- "tags": [],
206
- "readingTime": 0,
207
- "hasTruncateMarker": false,
208
- "authors": [],
209
- "frontMatter": {
210
- "date": "2019-01-02T00:00:00.000Z"
211
- },
212
- "unlisted": false,
213
- "prevItem": {
214
- "title": "Simple Slug",
215
- "permalink": "/blog-only/simple/slug"
216
- },
217
- "nextItem": {
218
- "title": "date-matter",
219
- "permalink": "/blog-only/date-matter"
220
- }
221
- },
222
- "content": ""
223
- },
224
- {
225
- "id": "/date-matter",
226
- "metadata": {
227
- "permalink": "/blog-only/date-matter",
228
- "editUrl": "https://github.com/facebook/docusaurus/edit/main/website/src/__tests__/__fixtures__/website/blog/date-matter.md",
229
- "source": "@site/src/__tests__/__fixtures__/website/blog/date-matter.md",
230
- "title": "date-matter",
231
- "description": "date inside front matter",
232
- "date": "2019-01-01T00:00:00.000Z",
233
- "formattedDate": "January 1, 2019",
234
- "tags": [
235
- {
236
- "label": "date",
237
- "permalink": "/blog-only/tags/date"
238
- }
239
- ],
240
- "readingTime": 0.02,
241
- "hasTruncateMarker": false,
242
- "authors": [],
243
- "frontMatter": {
244
- "date": "2019-01-01T00:00:00.000Z",
245
- "tags": [
246
- "date"
247
- ]
248
- },
249
- "unlisted": false,
250
- "prevItem": {
251
- "title": "some heading",
252
- "permalink": "/blog-only/heading-as-title"
253
- },
254
- "nextItem": {
255
- "title": "Happy 1st Birthday Slash!",
256
- "permalink": "/blog-only/2018/12/14/Happy-First-Birthday-Slash"
257
- }
258
- },
259
- "content": "date inside front matter"
260
- },
261
- {
262
- "id": "/2018/12/14/Happy-First-Birthday-Slash",
263
- "metadata": {
264
- "permalink": "/blog-only/2018/12/14/Happy-First-Birthday-Slash",
265
- "editUrl": "https://github.com/facebook/docusaurus/edit/main/website/src/__tests__/__fixtures__/website/blog/2018-12-14-Happy-First-Birthday-Slash.md",
266
- "source": "@site/src/__tests__/__fixtures__/website/blog/2018-12-14-Happy-First-Birthday-Slash.md",
267
- "title": "Happy 1st Birthday Slash!",
268
- "description": "Happy birthday!",
269
- "date": "2018-12-14T00:00:00.000Z",
270
- "formattedDate": "December 14, 2018",
271
- "tags": [
272
- {
273
- "label": "birthday",
274
- "permalink": "/blog-only/tags/birthday"
275
- }
276
- ],
277
- "readingTime": 0.01,
278
- "hasTruncateMarker": false,
279
- "authors": [
280
- {
281
- "name": "Yangshun Tay"
282
- },
283
- {
284
- "name": "Sébastien Lorber",
285
- "title": "Docusaurus maintainer",
286
- "email": "lorber.sebastien@gmail.com",
287
- "url": "https://sebastienlorber.com",
288
- "key": "slorber"
289
- }
290
- ],
291
- "frontMatter": {
292
- "title": "Happy 1st Birthday Slash!",
293
- "authors": [
294
- {
295
- "name": "Yangshun Tay"
296
- },
297
- "slorber"
298
- ],
299
- "tags": [
300
- "birthday"
301
- ]
302
- },
303
- "unlisted": false,
304
- "prevItem": {
305
- "title": "date-matter",
306
- "permalink": "/blog-only/date-matter"
307
- }
308
- },
309
- "content": "Happy birthday!"
310
- }
311
- ]
312
- }
@@ -1,11 +0,0 @@
1
- {
2
- "permalink": "/blog-only/page/2",
3
- "page": 2,
4
- "postsPerPage": 3,
5
- "totalPages": 3,
6
- "totalCount": 8,
7
- "previousPage": "/blog-only/",
8
- "nextPage": "/blog-only/page/3",
9
- "blogDescription": "Blog",
10
- "blogTitle": "Blog"
11
- }