mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-18 10:42:31 +02:00
* provide DocNavbarItem type * update snapshots * Fix Docusaurus tabs CSS * revert navbar tabs css/style changes, instead apply simple navbar__link--active class + make it configurable * Update website/docs/theme-classic.md Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com> * add dropdownActiveClassDisabled option Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
27 lines
726 B
TypeScript
27 lines
726 B
TypeScript
/**
|
|
* 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.
|
|
*/
|
|
|
|
import {DocMetadata, GlobalDoc, LoadedVersion, GlobalVersion} from './types';
|
|
|
|
export function toGlobalDataDoc(doc: DocMetadata): GlobalDoc {
|
|
return {
|
|
id: doc.unversionedId,
|
|
path: doc.permalink,
|
|
sidebar: doc.sidebar,
|
|
};
|
|
}
|
|
|
|
export function toGlobalDataVersion(version: LoadedVersion): GlobalVersion {
|
|
return {
|
|
name: version.versionName,
|
|
label: version.versionLabel,
|
|
isLast: version.isLast,
|
|
path: version.versionPath,
|
|
mainDocId: version.mainDocId,
|
|
docs: version.docs.map(toGlobalDataDoc),
|
|
};
|
|
}
|