@docusaurus/theme-classic 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/validateThemeConfig.js +3 -1
- package/lib-next/theme/BlogPostAuthor/index.js +1 -1
- package/lib-next/theme/BlogPostPage/index.js +1 -1
- package/lib-next/theme/DocItem/index.js +2 -2
- package/package.json +12 -12
- package/src/theme/BlogPostAuthor/index.tsx +1 -1
- package/src/theme/BlogPostPage/index.tsx +1 -1
- package/src/theme/DocItem/index.tsx +2 -2
- package/src/validateThemeConfig.ts +2 -0
|
@@ -228,8 +228,10 @@ const ThemeConfigSchema = _utilsValidation.Joi.object({
|
|
|
228
228
|
image: _utilsValidation.Joi.string(),
|
|
229
229
|
docs: DocsSchema,
|
|
230
230
|
metadata: _utilsValidation.Joi.array().items(HtmlMetadataSchema).default(DEFAULT_CONFIG.metadata),
|
|
231
|
+
// cSpell:ignore metadatas
|
|
231
232
|
metadatas: _utilsValidation.Joi.any().forbidden().messages({
|
|
232
|
-
'any.unknown':
|
|
233
|
+
'any.unknown': // cSpell:ignore metadatas
|
|
234
|
+
'themeConfig.metadatas has been renamed as themeConfig.metadata. See https://github.com/facebook/docusaurus/pull/5871'
|
|
233
235
|
}),
|
|
234
236
|
announcementBar: _utilsValidation.Joi.object({
|
|
235
237
|
id: _utilsValidation.Joi.string().default('announcement-bar'),
|
|
@@ -19,7 +19,7 @@ function BlogPostAuthor({author}) {
|
|
|
19
19
|
)}
|
|
20
20
|
|
|
21
21
|
{
|
|
22
|
-
// Note: only legacy author
|
|
22
|
+
// Note: only legacy author front matter allow empty name (not frontMatter.authors)
|
|
23
23
|
name && (
|
|
24
24
|
<div
|
|
25
25
|
className="avatar__intro"
|
|
@@ -57,7 +57,7 @@ function BlogPostPage(props) {
|
|
|
57
57
|
<meta property="og:type" content="article" />
|
|
58
58
|
<meta property="article:published_time" content={date} />
|
|
59
59
|
|
|
60
|
-
{/* TODO double check those article
|
|
60
|
+
{/* TODO double check those article meta array syntaxes, see https://ogp.me/#array */}
|
|
61
61
|
{authors.some((author) => author.url) && (
|
|
62
62
|
<meta
|
|
63
63
|
property="article:author"
|
|
@@ -28,7 +28,7 @@ export default function DocItem(props) {
|
|
|
28
28
|
toc_max_heading_level: tocMaxHeadingLevel,
|
|
29
29
|
} = frontMatter;
|
|
30
30
|
const {description, title} = metadata; // We only add a title if:
|
|
31
|
-
// - user asks to hide it with
|
|
31
|
+
// - user asks to hide it with front matter
|
|
32
32
|
// - the markdown content does not already contain a top-level h1 heading
|
|
33
33
|
|
|
34
34
|
const shouldAddTitle =
|
|
@@ -74,7 +74,7 @@ export default function DocItem(props) {
|
|
|
74
74
|
<div
|
|
75
75
|
className={clsx(ThemeClassNames.docs.docMarkdown, 'markdown')}>
|
|
76
76
|
{/*
|
|
77
|
-
Title can be declared inside md content or declared through
|
|
77
|
+
Title can be declared inside md content or declared through front matter and added manually
|
|
78
78
|
To make both cases consistent, the added title is added under the same div.markdown block
|
|
79
79
|
See https://github.com/facebook/docusaurus/pull/4882#issuecomment-853021120
|
|
80
80
|
*/}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-classic",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4484",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"update-code-translations": "node -e 'require(\"./update-code-translations.js\").run()'"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@docusaurus/core": "0.0.0-
|
|
27
|
-
"@docusaurus/plugin-content-blog": "0.0.0-
|
|
28
|
-
"@docusaurus/plugin-content-docs": "0.0.0-
|
|
29
|
-
"@docusaurus/plugin-content-pages": "0.0.0-
|
|
30
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
31
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
32
|
-
"@docusaurus/utils": "0.0.0-
|
|
33
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
26
|
+
"@docusaurus/core": "0.0.0-4484",
|
|
27
|
+
"@docusaurus/plugin-content-blog": "0.0.0-4484",
|
|
28
|
+
"@docusaurus/plugin-content-docs": "0.0.0-4484",
|
|
29
|
+
"@docusaurus/plugin-content-pages": "0.0.0-4484",
|
|
30
|
+
"@docusaurus/theme-common": "0.0.0-4484",
|
|
31
|
+
"@docusaurus/theme-translations": "0.0.0-4484",
|
|
32
|
+
"@docusaurus/utils": "0.0.0-4484",
|
|
33
|
+
"@docusaurus/utils-validation": "0.0.0-4484",
|
|
34
34
|
"@mdx-js/react": "^1.6.21",
|
|
35
35
|
"clsx": "^1.1.1",
|
|
36
36
|
"copy-text-to-clipboard": "^3.0.1",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"rtlcss": "^3.3.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
47
|
-
"@docusaurus/types": "0.0.0-
|
|
46
|
+
"@docusaurus/module-type-aliases": "0.0.0-4484",
|
|
47
|
+
"@docusaurus/types": "0.0.0-4484",
|
|
48
48
|
"@types/mdx-js__react": "^1.5.4",
|
|
49
49
|
"@types/parse-numeric-range": "^0.0.1",
|
|
50
50
|
"@types/rtlcss": "^3.1.1",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=14"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "ae60bd68f83e8063d4467fc31fa2c42432a5deeb"
|
|
63
63
|
}
|
|
@@ -22,7 +22,7 @@ function BlogPostAuthor({author}: Props): JSX.Element {
|
|
|
22
22
|
)}
|
|
23
23
|
|
|
24
24
|
{
|
|
25
|
-
// Note: only legacy author
|
|
25
|
+
// Note: only legacy author front matter allow empty name (not frontMatter.authors)
|
|
26
26
|
name && (
|
|
27
27
|
<div
|
|
28
28
|
className="avatar__intro"
|
|
@@ -62,7 +62,7 @@ function BlogPostPage(props: Props): JSX.Element {
|
|
|
62
62
|
<meta property="og:type" content="article" />
|
|
63
63
|
<meta property="article:published_time" content={date} />
|
|
64
64
|
|
|
65
|
-
{/* TODO double check those article
|
|
65
|
+
{/* TODO double check those article meta array syntaxes, see https://ogp.me/#array */}
|
|
66
66
|
{authors.some((author) => author.url) && (
|
|
67
67
|
<meta
|
|
68
68
|
property="article:author"
|
|
@@ -33,7 +33,7 @@ export default function DocItem(props: Props): JSX.Element {
|
|
|
33
33
|
const {description, title} = metadata;
|
|
34
34
|
|
|
35
35
|
// We only add a title if:
|
|
36
|
-
// - user asks to hide it with
|
|
36
|
+
// - user asks to hide it with front matter
|
|
37
37
|
// - the markdown content does not already contain a top-level h1 heading
|
|
38
38
|
const shouldAddTitle =
|
|
39
39
|
!hideTitle && typeof DocContent.contentTitle === 'undefined';
|
|
@@ -75,7 +75,7 @@ export default function DocItem(props: Props): JSX.Element {
|
|
|
75
75
|
<div
|
|
76
76
|
className={clsx(ThemeClassNames.docs.docMarkdown, 'markdown')}>
|
|
77
77
|
{/*
|
|
78
|
-
Title can be declared inside md content or declared through
|
|
78
|
+
Title can be declared inside md content or declared through front matter and added manually
|
|
79
79
|
To make both cases consistent, the added title is added under the same div.markdown block
|
|
80
80
|
See https://github.com/facebook/docusaurus/pull/4882#issuecomment-853021120
|
|
81
81
|
*/}
|
|
@@ -277,8 +277,10 @@ const ThemeConfigSchema = Joi.object({
|
|
|
277
277
|
metadata: Joi.array()
|
|
278
278
|
.items(HtmlMetadataSchema)
|
|
279
279
|
.default(DEFAULT_CONFIG.metadata),
|
|
280
|
+
// cSpell:ignore metadatas
|
|
280
281
|
metadatas: Joi.any().forbidden().messages({
|
|
281
282
|
'any.unknown':
|
|
283
|
+
// cSpell:ignore metadatas
|
|
282
284
|
'themeConfig.metadatas has been renamed as themeConfig.metadata. See https://github.com/facebook/docusaurus/pull/5871',
|
|
283
285
|
}),
|
|
284
286
|
announcementBar: Joi.object({
|