diff --git a/docs/.vitepress/config/sidebar.ts b/docs/.vitepress/config/sidebar.ts
index c5f8b6e55..d1273c269 100644
--- a/docs/.vitepress/config/sidebar.ts
+++ b/docs/.vitepress/config/sidebar.ts
@@ -1,6 +1,7 @@
import type { DefaultTheme } from 'vitepress';
import { sync } from 'fast-glob';
import * as matter from 'gray-matter';
+import { getChineseZodiac, getChineseZodiacAlias } from '../theme/utils.ts';
export const sidebar: DefaultTheme.Config['sidebar'] = {
'/categories/issues/': getItemsByDate("categories/issues"),
@@ -75,7 +76,8 @@ function getItemsByDate (path: string) {
// 添加年份分组
yearGroups.unshift({
- text: `${year}年 (${articleItems.length}篇)`,
+ text: `
+ ${year}年 (${articleItems.length}篇)`,
items: articleItems,
collapsed: true,
});
@@ -84,7 +86,8 @@ function getItemsByDate (path: string) {
if (topArticleItems.length > 0) {
// 添加置顶分组
yearGroups.unshift({
- text: `📑 我的置顶 (${topArticleItems.length}篇)`,
+ text: `
+ 我的置顶 (${topArticleItems.length}篇)`,
items: topArticleItems,
collapsed: false,
});
@@ -166,7 +169,16 @@ function addOrderNumber(groups) {
for (let i = 0; i < groups.length; i++) {
for (let j = 0; j < groups[i].items.length; j++) {
const items = groups[i].items;
- items[j].text = `[${j + 1}] ${items[j].text}`;
+ const index = j + 1;
+ let indexStyle = `