@apify/docs-theme 1.0.69 → 1.0.70
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Head from '@docusaurus/Head';
|
|
3
3
|
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
4
|
-
import {
|
|
4
|
+
import { useThemeConfig } from '@docusaurus/theme-common';
|
|
5
5
|
|
|
6
6
|
export default function SearchMetadata({ locale, version, tag }) {
|
|
7
7
|
const { siteConfig } = useDocusaurusContext();
|
|
@@ -10,12 +10,11 @@ export default function SearchMetadata({ locale, version, tag }) {
|
|
|
10
10
|
// keep the tag on same value for all the content, and add a new section + section tag
|
|
11
11
|
const section = siteConfig.projectName;
|
|
12
12
|
const sectionTag = tag;
|
|
13
|
-
const
|
|
14
|
-
const activeDocContext = useActiveDocContext(docsPluginId);
|
|
13
|
+
const { versions } = useThemeConfig();
|
|
15
14
|
|
|
16
15
|
// normalize the latest version regardless of what number it has,
|
|
17
16
|
// so we can search across all "latest versions of the docs"
|
|
18
|
-
if (!version || !
|
|
17
|
+
if (!version || !versions || version === versions[0]) {
|
|
19
18
|
version = 'latest';
|
|
20
19
|
}
|
|
21
20
|
|