@docusaurus/plugin-content-blog 0.0.0-4466 → 0.0.0-4484

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/authors.js CHANGED
@@ -31,7 +31,7 @@ async function getAuthorsMap(params) {
31
31
  }, validateAuthorsMap);
32
32
  }
33
33
  exports.getAuthorsMap = getAuthorsMap;
34
- // Legacy v1/early-v2 frontmatter fields
34
+ // Legacy v1/early-v2 front matter fields
35
35
  // We may want to deprecate those in favor of using only frontMatter.authors
36
36
  function getFrontMatterAuthorLegacy(frontMatter) {
37
37
  var _a, _b, _c;
@@ -86,7 +86,7 @@ ${Object.keys(authorsMap)
86
86
  }
87
87
  function toAuthor(frontMatterAuthor) {
88
88
  return {
89
- // Author def from authorsMap can be locally overridden by frontmatter
89
+ // Author def from authorsMap can be locally overridden by front matter
90
90
  ...getAuthorsMapAuthor(frontMatterAuthor.key),
91
91
  ...frontMatterAuthor,
92
92
  };
@@ -97,10 +97,10 @@ function getBlogPostAuthors(params) {
97
97
  const authorLegacy = getFrontMatterAuthorLegacy(params.frontMatter);
98
98
  const authors = getFrontMatterAuthors(params);
99
99
  if (authorLegacy) {
100
- // Technically, we could allow mixing legacy/authors frontmatter, but do we really want to?
100
+ // Technically, we could allow mixing legacy/authors front matter, but do we really want to?
101
101
  if (authors.length > 0) {
102
- throw new Error(`To declare blog post authors, use the 'authors' FrontMatter in priority.
103
- Don't mix 'authors' with other existing 'author_*' FrontMatter. Choose one or the other, not both at the same time.`);
102
+ throw new Error(`To declare blog post authors, use the 'authors' front matter in priority.
103
+ Don't mix 'authors' with other existing 'author_*' front matter. Choose one or the other, not both at the same time.`);
104
104
  }
105
105
  return [authorLegacy];
106
106
  }
@@ -25,7 +25,7 @@ const BlogFrontMatterSchema = utils_validation_1.JoiFrontMatter.object({
25
25
  tags: utils_validation_1.FrontMatterTagsSchema,
26
26
  draft: utils_validation_1.JoiFrontMatter.boolean(),
27
27
  date: utils_validation_1.JoiFrontMatter.date().raw(),
28
- // New multi-authors frontmatter:
28
+ // New multi-authors front matter:
29
29
  authors: utils_validation_1.JoiFrontMatter.alternatives()
30
30
  .try(utils_validation_1.JoiFrontMatter.string(), BlogPostFrontMatterAuthorSchema, utils_validation_1.JoiFrontMatter.array()
31
31
  .items(utils_validation_1.JoiFrontMatter.string(), BlogPostFrontMatterAuthorSchema)
@@ -36,7 +36,7 @@ const BlogFrontMatterSchema = utils_validation_1.JoiFrontMatter.object({
36
36
  .messages({
37
37
  'alternatives.match': FrontMatterAuthorErrorMessage,
38
38
  }),
39
- // Legacy author frontmatter
39
+ // Legacy author front matter
40
40
  author: utils_validation_1.JoiFrontMatter.string(),
41
41
  author_title: utils_validation_1.JoiFrontMatter.string(),
42
42
  author_url: utils_validation_1.URISchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-content-blog",
3
- "version": "0.0.0-4466",
3
+ "version": "0.0.0-4484",
4
4
  "description": "Blog plugin for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/plugin-content-blog.d.ts",
@@ -18,11 +18,11 @@
18
18
  },
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
- "@docusaurus/core": "0.0.0-4466",
22
- "@docusaurus/logger": "0.0.0-4466",
23
- "@docusaurus/mdx-loader": "0.0.0-4466",
24
- "@docusaurus/utils": "0.0.0-4466",
25
- "@docusaurus/utils-validation": "0.0.0-4466",
21
+ "@docusaurus/core": "0.0.0-4484",
22
+ "@docusaurus/logger": "0.0.0-4484",
23
+ "@docusaurus/mdx-loader": "0.0.0-4484",
24
+ "@docusaurus/utils": "0.0.0-4484",
25
+ "@docusaurus/utils-validation": "0.0.0-4484",
26
26
  "feed": "^4.2.2",
27
27
  "fs-extra": "^10.0.0",
28
28
  "lodash": "^4.17.20",
@@ -33,7 +33,7 @@
33
33
  "webpack": "^5.61.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@docusaurus/types": "0.0.0-4466",
36
+ "@docusaurus/types": "0.0.0-4484",
37
37
  "escape-string-regexp": "^4.0.0"
38
38
  },
39
39
  "peerDependencies": {
@@ -43,5 +43,5 @@
43
43
  "engines": {
44
44
  "node": ">=14"
45
45
  },
46
- "gitHead": "e610ca3c26f1f080d90ac0cf02e73e556142dd7f"
46
+ "gitHead": "ae60bd68f83e8063d4467fc31fa2c42432a5deeb"
47
47
  }
package/src/authors.ts CHANGED
@@ -54,7 +54,7 @@ type AuthorsParam = {
54
54
  authorsMap: AuthorsMap | undefined;
55
55
  };
56
56
 
57
- // Legacy v1/early-v2 frontmatter fields
57
+ // Legacy v1/early-v2 front matter fields
58
58
  // We may want to deprecate those in favor of using only frontMatter.authors
59
59
  function getFrontMatterAuthorLegacy(
60
60
  frontMatter: BlogPostFrontMatter,
@@ -123,7 +123,7 @@ ${Object.keys(authorsMap)
123
123
 
124
124
  function toAuthor(frontMatterAuthor: BlogPostFrontMatterAuthor): Author {
125
125
  return {
126
- // Author def from authorsMap can be locally overridden by frontmatter
126
+ // Author def from authorsMap can be locally overridden by front matter
127
127
  ...getAuthorsMapAuthor(frontMatterAuthor.key),
128
128
  ...frontMatterAuthor,
129
129
  };
@@ -137,11 +137,11 @@ export function getBlogPostAuthors(params: AuthorsParam): Author[] {
137
137
  const authors = getFrontMatterAuthors(params);
138
138
 
139
139
  if (authorLegacy) {
140
- // Technically, we could allow mixing legacy/authors frontmatter, but do we really want to?
140
+ // Technically, we could allow mixing legacy/authors front matter, but do we really want to?
141
141
  if (authors.length > 0) {
142
142
  throw new Error(
143
- `To declare blog post authors, use the 'authors' FrontMatter in priority.
144
- Don't mix 'authors' with other existing 'author_*' FrontMatter. Choose one or the other, not both at the same time.`,
143
+ `To declare blog post authors, use the 'authors' front matter in priority.
144
+ Don't mix 'authors' with other existing 'author_*' front matter. Choose one or the other, not both at the same time.`,
145
145
  );
146
146
  }
147
147
  return [authorLegacy];
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  import {
9
- JoiFrontMatter as Joi, // Custom instance for frontmatter
9
+ JoiFrontMatter as Joi, // Custom instance for front matter
10
10
  URISchema,
11
11
  validateFrontMatter,
12
12
  FrontMatterTagsSchema,
@@ -35,7 +35,7 @@ const BlogFrontMatterSchema = Joi.object<BlogPostFrontMatter>({
35
35
  draft: Joi.boolean(),
36
36
  date: Joi.date().raw(),
37
37
 
38
- // New multi-authors frontmatter:
38
+ // New multi-authors front matter:
39
39
  authors: Joi.alternatives()
40
40
  .try(
41
41
  Joi.string(),
@@ -50,7 +50,7 @@ const BlogFrontMatterSchema = Joi.object<BlogPostFrontMatter>({
50
50
  .messages({
51
51
  'alternatives.match': FrontMatterAuthorErrorMessage,
52
52
  }),
53
- // Legacy author frontmatter
53
+ // Legacy author front matter
54
54
  author: Joi.string(),
55
55
  author_title: Joi.string(),
56
56
  author_url: URISchema,
@@ -30,11 +30,11 @@ declare module '@docusaurus/plugin-content-blog' {
30
30
  tags?: FrontMatterTag[];
31
31
  slug?: string;
32
32
  draft?: boolean;
33
- date?: Date | string; // Yaml automagically convert some string patterns as Date, but not all
33
+ date?: Date | string; // Yaml automatically convert some string patterns as Date, but not all
34
34
 
35
35
  authors?: BlogPostFrontMatterAuthors;
36
36
 
37
- // We may want to deprecate those older author frontmatter fields later:
37
+ // We may want to deprecate those older author front matter fields later:
38
38
  author?: string;
39
39
  author_title?: string;
40
40
  author_url?: string;