diff --git a/Dockerfile b/Dockerfile index b427c9dc..048ccbc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ -FROM docker.akaere.online/node:23 AS builder +FROM node:23 AS builder WORKDIR ./ COPY . . RUN npm install RUN npm run docs:build RUN ls -FROM docker.akaere.online/nginx +FROM nginx WORKDIR /usr/share/nginx/html/ COPY --from=builder ./src/.vuepress/dist ./ RUN ls diff --git a/src/.vuepress/client.ts b/src/.vuepress/client.ts index 071782c0..fb2bcaa6 100644 --- a/src/.vuepress/client.ts +++ b/src/.vuepress/client.ts @@ -17,6 +17,7 @@ import Randompicturecount from "./components/Randompicturecount.vue"; import GameofLife from "./components/GameofLife.vue"; import Langtonsant from "./components/Langtonsant.vue"; import DNSLeak from "./components/DNSLeak.vue"; +import GitCommits from "./components/GitCommits.vue"; export default defineClientConfig({ @@ -37,6 +38,7 @@ export default defineClientConfig({ app.component("GameofLife", GameofLife); app.component("Langtonsant", Langtonsant); app.component("DNSLeak", DNSLeak); + app.component("GitCommits", GitCommits); Sentry.init({ dsn: "https://188c5d205854b35b009d4ad76674d3bc@o4508158776705024.ingest.us.sentry.io/4508158792826880", // 替换为你的 Sentry DSN integrations: [ diff --git a/src/.vuepress/components/GitCommits.vue b/src/.vuepress/components/GitCommits.vue new file mode 100644 index 00000000..8a6c7102 --- /dev/null +++ b/src/.vuepress/components/GitCommits.vue @@ -0,0 +1,243 @@ + + + + + + + + 加载中 + 正在获取Git提交记录... + + + 错误 + {{ error }} + + API请求次数已达上限,请等待: {{ rateLimitResetTime }} + + + + + + + Commit ID + 提交日期 + 提交内容 + 提交者 + + + + + + + {{ commit.sha.substring(0, 7) }} + + {{ formatDate(commit.commit.author.date) }} + {{ commit.commit.message }} + {{ commit.commit.author.name }} + + + + + + + + + + + \ No newline at end of file diff --git a/src/intro.md b/src/intro.md index 09a0026c..42e6d6c1 100644 --- a/src/intro.md +++ b/src/intro.md @@ -38,6 +38,10 @@ article: false class="cat-logo" /> +## 更新记录 + + +
加载中
正在获取Git提交记录...
错误
{{ error }}
+ API请求次数已达上限,请等待: {{ rateLimitResetTime }} +