From 0347f96547f58872061029e5f6346ed043eb42fd Mon Sep 17 00:00:00 2001 From: sanbuphy Date: Mon, 12 Jan 2026 17:08:20 +0800 Subject: [PATCH] ci(deploy): simplify workflow trigger to run on every push style(theme): improve sidebar spacing specificity in CSS --- .github/workflows/deploy.yml | 3 +-- docs/.vitepress/theme/style.css | 14 +++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index ddc0f7f..2308854 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,9 +2,8 @@ name: Deploy VitePress site to Pages on: - # Runs on pushes targeting the `main` branch. Change this to `master` if you're using `master` branch. + # Runs on every push. push: - branches: [main, master, version2] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/docs/.vitepress/theme/style.css b/docs/.vitepress/theme/style.css index ab27e8a..b3fc1bb 100644 --- a/docs/.vitepress/theme/style.css +++ b/docs/.vitepress/theme/style.css @@ -4,38 +4,38 @@ } /* 减少一级标题(如"前端开发")底部的间距 */ -.VPSidebarItem.level-0 { +.VPSidebar .VPSidebarItem.level-0 { padding-bottom: 4px; } /* 减少一级标题文字与下方子菜单的间距 */ -.VPSidebarItem.level-0 > .item { +.VPSidebar .VPSidebarItem.level-0 > .item { padding-bottom: 2px; } /* 调整子菜单项之间的间距 */ -.VPSidebarItem.level-1 .item { +.VPSidebar .VPSidebarItem.level-1 .item { padding: 2px 0; } /* 针对可能存在的特定类名进行覆盖,确保紧凑 */ -.VPSidebarGroup { +.VPSidebar .VPSidebarGroup { padding-top: 6px; padding-bottom: 6px; } /* 进一步压缩分组标题与第一项之间的间距 */ -.VPSidebarItem.level-0 + .VPSidebarItem.level-1 { +.VPSidebar .VPSidebarItem.level-0 + .VPSidebarItem.level-1 { margin-top: -2px; } /* 压缩分组标题本身的行高 */ -.VPSidebarItem.level-0 .text { +.VPSidebar .VPSidebarItem.level-0 .text { line-height: 1.3; } /* 压缩子项的行高 */ -.VPSidebarItem.level-1 .text { +.VPSidebar .VPSidebarItem.level-1 .text { line-height: 1.4; }