@docusaurus/theme-classic 0.0.0-4595 → 0.0.0-4603

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.
@@ -6,15 +6,20 @@
6
6
  */
7
7
  import React from 'react';
8
8
  import Head from '@docusaurus/Head';
9
- // Note: we don't couple this to Algolia/DocSearch on purpose
10
- // We may want to support other search engine plugins too
11
- // Search plugins should swizzle/override this comp to add their behavior
9
+ // Note: we bias toward using Algolia metadata on purpose
10
+ // Not doing so leads to confusion in the community,
11
+ // as it requires to first crawl the site with the Algolia plugin enabled first
12
+ // - https://github.com/facebook/docusaurus/issues/6693
13
+ // - https://github.com/facebook/docusaurus/issues/4555
12
14
  export default function SearchMetadata({locale, version, tag}) {
15
+ // Seems safe to consider here the locale is the language, as the existing
16
+ // docsearch:language filter is afaik a regular string-based filter
17
+ const language = locale;
13
18
  return (
14
19
  <Head>
15
- {locale && <meta name="docusaurus_locale" content={locale} />}
16
- {version && <meta name="docusaurus_version" content={version} />}
17
- {tag && <meta name="docusaurus_tag" content={tag} />}
20
+ {language && <meta name="docsearch:language" content={language} />}
21
+ {version && <meta name="docsearch:version" content={version} />}
22
+ {tag && <meta name="docsearch:docusaurus_tag" content={tag} />}
18
23
  </Head>
19
24
  );
20
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-classic",
3
- "version": "0.0.0-4595",
3
+ "version": "0.0.0-4603",
4
4
  "description": "Classic theme for Docusaurus",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/theme-classic.d.ts",
@@ -21,15 +21,15 @@
21
21
  "format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\""
22
22
  },
23
23
  "dependencies": {
24
- "@docusaurus/core": "0.0.0-4595",
25
- "@docusaurus/plugin-content-blog": "0.0.0-4595",
26
- "@docusaurus/plugin-content-docs": "0.0.0-4595",
27
- "@docusaurus/plugin-content-pages": "0.0.0-4595",
28
- "@docusaurus/theme-common": "0.0.0-4595",
29
- "@docusaurus/theme-translations": "0.0.0-4595",
30
- "@docusaurus/utils": "0.0.0-4595",
31
- "@docusaurus/utils-common": "0.0.0-4595",
32
- "@docusaurus/utils-validation": "0.0.0-4595",
24
+ "@docusaurus/core": "0.0.0-4603",
25
+ "@docusaurus/plugin-content-blog": "0.0.0-4603",
26
+ "@docusaurus/plugin-content-docs": "0.0.0-4603",
27
+ "@docusaurus/plugin-content-pages": "0.0.0-4603",
28
+ "@docusaurus/theme-common": "0.0.0-4603",
29
+ "@docusaurus/theme-translations": "0.0.0-4603",
30
+ "@docusaurus/utils": "0.0.0-4603",
31
+ "@docusaurus/utils-common": "0.0.0-4603",
32
+ "@docusaurus/utils-validation": "0.0.0-4603",
33
33
  "@mdx-js/react": "^1.6.22",
34
34
  "clsx": "^1.1.1",
35
35
  "copy-text-to-clipboard": "^3.0.1",
@@ -42,8 +42,8 @@
42
42
  "rtlcss": "^3.3.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@docusaurus/module-type-aliases": "0.0.0-4595",
46
- "@docusaurus/types": "0.0.0-4595",
45
+ "@docusaurus/module-type-aliases": "0.0.0-4603",
46
+ "@docusaurus/types": "0.0.0-4603",
47
47
  "@types/mdx-js__react": "^1.5.5",
48
48
  "@types/prismjs": "^1.26.0",
49
49
  "@types/rtlcss": "^3.1.2",
@@ -59,5 +59,5 @@
59
59
  "engines": {
60
60
  "node": ">=14"
61
61
  },
62
- "gitHead": "3bd73b49c00b9438753da2f060eba352b1f8536b"
62
+ "gitHead": "fe604646515d9243294a016c9d5f64fdfc4c5e72"
63
63
  }
@@ -10,19 +10,25 @@ import React from 'react';
10
10
  import Head from '@docusaurus/Head';
11
11
  import type {Props} from '@theme/SearchMetadata';
12
12
 
13
- // Note: we don't couple this to Algolia/DocSearch on purpose
14
- // We may want to support other search engine plugins too
15
- // Search plugins should swizzle/override this comp to add their behavior
13
+ // Note: we bias toward using Algolia metadata on purpose
14
+ // Not doing so leads to confusion in the community,
15
+ // as it requires to first crawl the site with the Algolia plugin enabled first
16
+ // - https://github.com/facebook/docusaurus/issues/6693
17
+ // - https://github.com/facebook/docusaurus/issues/4555
16
18
  export default function SearchMetadata({
17
19
  locale,
18
20
  version,
19
21
  tag,
20
22
  }: Props): JSX.Element {
23
+ // Seems safe to consider here the locale is the language, as the existing
24
+ // docsearch:language filter is afaik a regular string-based filter
25
+ const language = locale;
26
+
21
27
  return (
22
28
  <Head>
23
- {locale && <meta name="docusaurus_locale" content={locale} />}
24
- {version && <meta name="docusaurus_version" content={version} />}
25
- {tag && <meta name="docusaurus_tag" content={tag} />}
29
+ {language && <meta name="docsearch:language" content={language} />}
30
+ {version && <meta name="docsearch:version" content={version} />}
31
+ {tag && <meta name="docsearch:docusaurus_tag" content={tag} />}
26
32
  </Head>
27
33
  );
28
34
  }