mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-15 10:07:33 +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
|
@ -137,7 +137,7 @@ export function toTagDocListProp({
|
|||
}: {
|
||||
allTagsPath: string;
|
||||
tag: VersionTag;
|
||||
docs: Pick<DocMetadata, 'id' | 'title' | 'description' | 'permalink'>[];
|
||||
docs: DocMetadata[];
|
||||
}): PropTagDocList {
|
||||
function toDocListProp(): PropTagDocListDoc[] {
|
||||
const list = _.compact(
|
||||
|
@ -154,9 +154,10 @@ export function toTagDocListProp({
|
|||
}
|
||||
|
||||
return {
|
||||
name: tag.label,
|
||||
label: tag.label,
|
||||
permalink: tag.permalink,
|
||||
docs: toDocListProp(),
|
||||
allTagsPath,
|
||||
count: tag.docIds.length,
|
||||
items: toDocListProp(),
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue