diff --git a/themes/Hexo/LayoutCategoryIndex.js b/themes/Hexo/LayoutCategoryIndex.js index 5c6de632..1eadfc7d 100644 --- a/themes/Hexo/LayoutCategoryIndex.js +++ b/themes/Hexo/LayoutCategoryIndex.js @@ -20,16 +20,16 @@ export const LayoutCategoryIndex = props => { {locale.COMMON.CATEGORY}:
- {Object.keys(categories).map(category => { + {categories.map(category => { return ( - +
- {category}({categories[category]}) + {category.name}({category.count})
) diff --git a/themes/Hexo/components/CategoryGroup.js b/themes/Hexo/components/CategoryGroup.js index 69865b56..a14e15d9 100644 --- a/themes/Hexo/components/CategoryGroup.js +++ b/themes/Hexo/components/CategoryGroup.js @@ -7,14 +7,14 @@ const CategoryGroup = ({ currentCategory, categories }) => { } return <>
- {Object.keys(categories).map(category => { - const selected = currentCategory === category - return + {categories.map(category => { + const selected = currentCategory === category.name + return -
{category}({categories[category]})
+
{category.name}({category.count})
})} diff --git a/themes/index.js b/themes/index.js index 13b192e4..5acc65dd 100644 --- a/themes/index.js +++ b/themes/index.js @@ -4,6 +4,6 @@ // export * from './Empty' // 空主题 // export * from './NEXT' -export * from './Fukasawa' -// export * from './Hexo' +// export * from './Fukasawa' +export * from './Hexo' // export * from './Medium'