mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-03 11:22:30 +02:00
refactor(content-{blog,docs}): unify handling of tags (#7117)
This commit is contained in:
parent
ca718ccac0
commit
1156be3f20
24 changed files with 170 additions and 178 deletions
|
@ -7,7 +7,8 @@
|
|||
|
||||
declare module '@docusaurus/plugin-content-docs' {
|
||||
import type {MDXOptions} from '@docusaurus/mdx-loader';
|
||||
import type {ContentPaths, Tag, FrontMatterTag} from '@docusaurus/utils';
|
||||
import type {ContentPaths, FrontMatterTag} from '@docusaurus/utils';
|
||||
import type {TagsListItem, TagModule, Tag} from '@docusaurus/types';
|
||||
import type {Required} from 'utility-types';
|
||||
|
||||
export type Assets = {
|
||||
|
@ -483,25 +484,14 @@ declare module '@docusaurus/plugin-content-docs' {
|
|||
export type PropSidebar = import('./sidebars/types').PropSidebar;
|
||||
export type PropSidebars = import('./sidebars/types').PropSidebars;
|
||||
|
||||
export type PropTagDocListDoc = {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
permalink: string;
|
||||
};
|
||||
export type PropTagDocList = {
|
||||
allTagsPath: string;
|
||||
name: string; // normalized name/label of the tag
|
||||
permalink: string; // pathname of the tag
|
||||
docs: PropTagDocListDoc[];
|
||||
};
|
||||
export type PropTagDocListDoc = Pick<
|
||||
DocMetadata,
|
||||
'id' | 'title' | 'description' | 'permalink'
|
||||
>;
|
||||
export type PropTagDocList = TagModule & {items: PropTagDocListDoc[]};
|
||||
|
||||
export type PropTagsListPage = {
|
||||
tags: {
|
||||
name: string;
|
||||
permalink: string;
|
||||
count: number;
|
||||
}[];
|
||||
tags: TagsListItem[];
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue