docs: 更新文档路径说明并添加GitHub星标组件

- 在frontend-config.md中补充组件源码目录说明
- 统一文档中组件路径的表示方式(@docs/widget → /docs/widget)
- 从导航栏社交链接中移除GitHub图标
- 新增GitHubStar组件,在导航栏显示项目星标数
- 添加对应样式支持星标组件显示效果
This commit is contained in:
anghunk
2026-01-30 10:23:50 +08:00
parent 80e234be7c
commit b6f21b309e
6 changed files with 119 additions and 6 deletions

View File

@@ -22,4 +22,41 @@
.image-src {
max-width: 200px !important;
}
}
.github-star-link {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 2px 8px;
margin-left: 10px;
border-radius: 999px;
border: 1px solid var(--vp-c-border);
font-size: 12px;
color: var(--vp-c-text-1);
text-decoration: none;
transition:
background-color 0.2s ease,
border-color 0.2s ease,
color 0.2s ease;
}
.github-star-link:hover {
background-color: var(--vp-c-bg-soft);
border-color: var(--vp-c-brand-1);
color: var(--vp-c-brand-1);
}
.github-star-icon svg {
width: 16px;
}
.github-star-text {
display: inline-flex;
align-items: center;
}
.github-star-count {
margin-left: 4px;
font-weight: 600;
}

View File

@@ -1,6 +1,7 @@
import DefaultTheme from 'vitepress/theme';
import { h } from 'vue';
import FooterDoc from '../components/footerDoc.vue';
import GitHubStar from '../components/githubStar.vue';
import './custom.css';
export default {
@@ -11,6 +12,7 @@ export default {
return h(Layout, null, {
'doc-footer-before': () => h(FooterDoc),
'home-features-after': () => h('div', { class: 'extra-class' }, [h(FooterDoc)]),
'nav-bar-content-after': () => h(GitHubStar),
});
},
};