Skip to content

Commit d0747d1

Browse files
committed
2 parents 8312246 + 0915e47 commit d0747d1

30 files changed

+291
-430
lines changed

.env.data

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
GITEE_USERNAME=
2+
GITEE_PASSWORD=
3+
4+
BLOG_CHANGELOG_WINCLIENT_ZH_ID=
5+
BLOG_CHANGELOG_WINCLIENT_EN_ID=
6+
BLOG_CHANGELOG_WINCLIENT_JA_ID=
7+
BLOG_CHANGELOG_WEB_ZH_ID=
8+
BLOG_CHANGELOG_WEB_EN_ID=
9+
BLOG_CHANGELOG_WEB_JA_ID=

.github/workflows/deployment.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,22 @@ jobs:
4040
run_install: true
4141

4242
# 构建
43+
- name: Export .env File
44+
run: pnpm build-env
45+
env:
46+
BLOG_CHANGELOG_WINCLIENT_ZH_ID: ${{ env.BLOG_CHANGELOG_WINCLIENT_ZH_ID }}
47+
BLOG_CHANGELOG_WINCLIENT_EN_ID: ${{ env.BLOG_CHANGELOG_WINCLIENT_EN_ID }}
48+
BLOG_CHANGELOG_WINCLIENT_JA_ID: ${{ env.BLOG_CHANGELOG_WINCLIENT_JA_ID }}
49+
BLOG_CHANGELOG_WEB_ZH_ID: ${{ env.BLOG_CHANGELOG_WEB_ZH_ID }}
50+
BLOG_CHANGELOG_WEB_EN_ID: ${{ env.BLOG_CHANGELOG_WEB_EN_ID }}
51+
BLOG_CHANGELOG_WEB_JA_ID: ${{ env.BLOG_CHANGELOG_WEB_JA_ID }}
52+
53+
- name: Refresh Members Data
54+
run: pnpm build-member
55+
env:
56+
GITEE_USERNAME: ${{ secrets.GITEE_USERNAME }}
57+
GITEE_PASSWORD: ${{ secrets.GITEE_PASSWORD }}
58+
4359
- name: Refresh Blog Data
4460
run: pnpm build-blog
4561
env:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ dist
2424
.vitepress/dist/
2525
.temp
2626
# Env files
27+
.env.local
2728
.env.*.local
2829

2930
# Test coverage files

.pages.yml

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -6,56 +6,3 @@ content:
66
label: src
77
type: collection
88
path: src
9-
- name: release
10-
label: 客户端更新日志
11-
path: src/_data/windows-client.json
12-
type: file
13-
list: true
14-
fields:
15-
- name: version
16-
label: 版本
17-
type: string
18-
- name: type
19-
label: 版本 Prefix
20-
type: select
21-
options:
22-
values: [Beta, Alpha, RC, Release, Stable, Test]
23-
- name: date
24-
label: 发布日期
25-
type: date
26-
options:
27-
time: true
28-
format: yyyy-MM-dd
29-
- name: description
30-
label: 描述
31-
type: rich-text
32-
- name: warning
33-
label: 重要更改/关键版本提示
34-
type: string
35-
- name: features
36-
label: 新增功能
37-
list: true
38-
type: rich-text
39-
- name: fixes
40-
label: 修复问题
41-
list: true
42-
type: rich-text
43-
- name: breaking
44-
label: 重大变更
45-
list: true
46-
type: rich-text
47-
- name: optimized
48-
label: 体验优化
49-
list: true
50-
type: rich-text
51-
- name: actions
52-
label: actions
53-
type: object
54-
fields:
55-
- name: text
56-
label: text
57-
type: string
58-
- name: link
59-
label: link
60-
type: string
61-
pattern: ^(https?:\/\/)?(www\.)?[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(\/[^\s]*)?$

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ cache/
1414
.vscode/
1515
auto-imports.d.ts
1616
pnpm-lock.yaml
17+
18+
src/_data/*.json

.vitepress/config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { mark } from '@mdit/plugin-mark'
77
import { spoiler } from '@mdit/plugin-spoiler'
88
import { sub } from '@mdit/plugin-sub'
99
import { sup } from '@mdit/plugin-sup'
10+
import MarkdownItVairable from 'markdown-it-variable'
1011
import MarkdownItFootnote from 'markdown-it-footnote'
1112
import MarkdownItKbd from 'markdown-it-kbd-better'
1213
import lightbox from './plugins/lightbox'
@@ -418,6 +419,7 @@ export default defineConfig({
418419
lazyLoading: true,
419420
},
420421
config(md) {
422+
md.use(MarkdownItVairable)
421423
md.use(MarkdownItFootnote)
422424
md.use(colorPreviewPlugin)
423425
md.use(cardPlugin)

.vitepress/theme/apis/forum/gitee/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
export const GITEE_API_CONFIG = {
22
PREFIX_URL: 'https://gitee.com/',
3-
START_POINT: 'api/v5/',
3+
ENDPOINT_PREFIX: 'api/v5/',
44
CLIENT_ID: '053290d8af24515ea1ba7aa9d19175698eef3be29ada8a6a3156804093a21c4d',
55
CLIENT_SECRET:
66
'490930078ce5da2580a193af163c275c670567e70a93fbe0ca39e15faa8f5271',
77
OWNER: 'KYJGYSDT',
8-
REPO: 'Feedback',
8+
FEEDBACK_REPO: 'Feedback',
99
BLOG_REPO: 'Blog',
1010
TOPIC_TYPE: ['BUG', 'FEAT', 'SUG', 'ANN'],
1111
STATE_TAGS: new Set([

.vitepress/theme/apis/forum/gitee/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const cachedApiCall = useMemoize(
3636
endpoint: string,
3737
{ params = {}, hooks = {}, body }: ApiCallParams,
3838
): ApiCallResult<T> => {
39-
const url = `${GITEE_API_CONFIG.START_POINT}${endpoint}`
39+
const url = `${GITEE_API_CONFIG.ENDPOINT_PREFIX}${endpoint}`
4040

4141
const options = {
4242
hooks,

.vitepress/theme/apis/forum/gitee/issues.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { reformat } from '../webhook'
1717
export const getTopic = async (number: string): Promise<ForumAPI.Topic> => {
1818
const [data] = await apiCall<GITEE.IssueInfo>(
1919
'get',
20-
`repos/${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.REPO}/issues/${number}`,
20+
`repos/${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.FEEDBACK_REPO}/issues/${number}`,
2121
)
2222

2323
return normalizeIssue(data)
@@ -33,7 +33,7 @@ export const getTopics = async (
3333
const [[issues, paginationParams], [comments]] = await Promise.all([
3434
apiCall<GITEE.IssueList>(
3535
'get',
36-
`repos/${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.REPO}/issues`,
36+
`repos/${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.FEEDBACK_REPO}/issues`,
3737
{
3838
params: {
3939
state: state || 'open',
@@ -46,7 +46,7 @@ export const getTopics = async (
4646
),
4747
apiCall<GITEE.CommentList>(
4848
'get',
49-
`repos/${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.REPO}/issues/comments`,
49+
`repos/${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.FEEDBACK_REPO}/issues/comments`,
5050
{
5151
params: {
5252
page: query.current,
@@ -83,7 +83,7 @@ export const getTopics = async (
8383
export const getAnnouncementList = async (): Promise<ForumAPI.Topic[]> => {
8484
const [issues] = await apiCall<GITEE.IssueList>(
8585
'get',
86-
`repos/${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.REPO}/issues`,
86+
`repos/${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.FEEDBACK_REPO}/issues`,
8787
{
8888
params: {
8989
state: 'open',
@@ -97,7 +97,9 @@ export const getAnnouncementList = async (): Promise<ForumAPI.Topic[]> => {
9797
}
9898

9999
export const getTopicComments = async (
100-
repo: typeof GITEE_API_CONFIG.REPO | typeof GITEE_API_CONFIG.BLOG_REPO,
100+
repo:
101+
| typeof GITEE_API_CONFIG.FEEDBACK_REPO
102+
| typeof GITEE_API_CONFIG.BLOG_REPO,
101103
query: ForumAPI.Query,
102104
number: string,
103105
): Promise<ForumAPI.PaginatedResult<ForumAPI.Comment[]>> => {
@@ -128,7 +130,7 @@ export const searchTopics = async (
128130
`search/issues`,
129131
{
130132
params: {
131-
repo: `${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.REPO}`,
133+
repo: `${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.FEEDBACK_REPO}`,
132134
state: 'open',
133135
q: q,
134136
sort: query.sort + '_at',
@@ -152,7 +154,7 @@ export const postTopic = async (data: {
152154
}): Promise<ForumAPI.Topic> => {
153155
const form = buildFormData({
154156
owner: GITEE_API_CONFIG.OWNER,
155-
repo: GITEE_API_CONFIG.REPO,
157+
repo: GITEE_API_CONFIG.FEEDBACK_REPO,
156158
...data,
157159
})
158160

@@ -194,7 +196,7 @@ export const deleteTopicComment = async (
194196

195197
await apiCall<GITEE.IssueList>(
196198
'delete',
197-
`repos/${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.REPO}/issues/comments/${id}`,
199+
`repos/${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.FEEDBACK_REPO}/issues/comments/${id}`,
198200
{
199201
params: {
200202
id,
@@ -227,7 +229,7 @@ export const putTopic = async (
227229
`repos/${GITEE_API_CONFIG.OWNER}/issues/${number}`,
228230
{
229231
params: {
230-
repo: GITEE_API_CONFIG.REPO,
232+
repo: GITEE_API_CONFIG.FEEDBACK_REPO,
231233
owner: GITEE_API_CONFIG.OWNER,
232234
...data,
233235
},
@@ -273,7 +275,7 @@ export const getUserCreatedTopics = async (
273275
.filter(
274276
(val) =>
275277
val.repository.full_name ===
276-
GITEE_API_CONFIG.OWNER + '/' + GITEE_API_CONFIG.REPO,
278+
GITEE_API_CONFIG.OWNER + '/' + GITEE_API_CONFIG.FEEDBACK_REPO,
277279
)
278280
.map((val) => normalizeIssue(val)),
279281
...paginationParams!,
@@ -282,6 +284,6 @@ export const getUserCreatedTopics = async (
282284

283285
export const openTopicOnGitee = (number: string | number) => {
284286
window.open(
285-
`https://gitee.com/${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.REPO}/issues/${number}`,
287+
`https://gitee.com/${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.FEEDBACK_REPO}/issues/${number}`,
286288
)
287289
}

.vitepress/theme/apis/forum/gitee/labels.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const getAllLabels = async (
88
return (
99
await apiCall<GITEE.IssueLabel[]>(
1010
'get',
11-
`repos/${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.REPO}/labels`,
11+
`repos/${GITEE_API_CONFIG.OWNER}/${GITEE_API_CONFIG.FEEDBACK_REPO}/labels`,
1212
{
1313
useCache,
1414
},

0 commit comments

Comments
 (0)