Skip to content

Commit

Permalink
💄 style: Update TOC
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Nov 21, 2024
1 parent ace947d commit 0f8e494
Show file tree
Hide file tree
Showing 2 changed files with 880 additions and 0 deletions.
20 changes: 20 additions & 0 deletions scripts/tocWorkflow/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,42 @@ const run = () => {
const { data } = matter(md);
return {
color: Icon.colorPrimary,
colorGradient: Icon?.colorGradient,
desc: data?.description,
docsUrl: customKebabCase(key),
fullTitle: data?.title,
group: String(data?.group?.title || data?.group).toLowerCase(),
id: key,
param: {
hasAvatar: !!Icon?.Avatar,
hasBrand: !!Icon?.Brand,
hasBrandColor: !!Icon?.BrandColor,
hasColor: !!Icon?.Color,
hasCombine: !!Icon?.Combine,
hasText: !!Icon?.Text,
hasTextCn: !!Icon?.TextCn,
},
title: Icon.title,
};
});

const content = `export interface IconToc {
color: string;
colorGradient?: string;
desc: string;
docsUrl: string;
fullTitle: string;
group: 'model' | 'provider' | 'application';
id: string;
param: {
hasAvatar: boolean;
hasBrand: boolean;
hasBrandColor: boolean;
hasColor: boolean;
hasCombine: boolean;
hasText: boolean;
hasTextCn: boolean;
};
title: string;
}
Expand Down
Loading

0 comments on commit 0f8e494

Please sign in to comment.