mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 00:39:45 +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
19
packages/docusaurus-types/src/index.d.ts
vendored
19
packages/docusaurus-types/src/index.d.ts
vendored
|
@ -594,3 +594,22 @@ export type ClientModule = {
|
|||
}) => void;
|
||||
onRouteUpdateDelayed?: (args: {location: Location}) => void;
|
||||
};
|
||||
|
||||
/** 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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue