mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +02:00
refactor(types): move non-core, non-public types out of the types package (#7293)
This commit is contained in:
parent
c7a5af7c4d
commit
b49ae67521
25 changed files with 397 additions and 404 deletions
|
@ -57,6 +57,9 @@ export {
|
|||
buildSshUrl,
|
||||
} from './urlUtils';
|
||||
export {
|
||||
type Tag,
|
||||
type TagsListItem,
|
||||
type TagModule,
|
||||
type FrontMatterTag,
|
||||
normalizeFrontMatterTags,
|
||||
groupTaggedItems,
|
||||
|
|
|
@ -7,7 +7,25 @@
|
|||
|
||||
import _ from 'lodash';
|
||||
import {normalizeUrl} from './urlUtils';
|
||||
import type {Tag} from '@docusaurus/types';
|
||||
|
||||
/** What the user configures. */
|
||||
export type Tag = {
|
||||
label: string;
|
||||
/** Permalink to this tag's page, without the `/tags/` base path. */
|
||||
permalink: string;
|
||||
};
|
||||
|
||||
/** What the tags list page should know about each tag. */
|
||||
export type TagsListItem = Tag & {
|
||||
/** Number of posts/docs with this tag. */
|
||||
count: number;
|
||||
};
|
||||
|
||||
/** What the tag's own page should know about the tag. */
|
||||
export type TagModule = TagsListItem & {
|
||||
/** The tags list page's permalink. */
|
||||
allTagsPath: string;
|
||||
};
|
||||
|
||||
export type FrontMatterTag = string | Tag;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue