mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-05 12:22:45 +02:00
feat(v2): add search page (#2756)
This commit is contained in:
parent
1fe2dc192e
commit
3ad4550854
12 changed files with 688 additions and 38 deletions
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
let versions: string[] = [];
|
||||
|
||||
try {
|
||||
versions = require('@site/versions.json');
|
||||
} catch (e) {}
|
||||
|
||||
function useVersioning() {
|
||||
return {
|
||||
versioningEnabled: versions.length > 0,
|
||||
versions,
|
||||
latestVersion: versions[0],
|
||||
};
|
||||
}
|
||||
|
||||
export default useVersioning;
|
Loading…
Add table
Add a link
Reference in a new issue