Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
0ab81c7
Update config.ts
aiastia Apr 14, 2026
0937129
docs: 添加 README.md,更新 Node.js 版本建议为 20 LTS
aiastia Apr 14, 2026
061f9fd
fix: 更新 GitHub Actions 配置,适配 Node 24 弃用警告
aiastia Apr 14, 2026
7c38bfa
feat: 升级 VitePress 2.x + Node.js 24 全面更新
aiastia Apr 14, 2026
1ab274f
chore: 删除废弃的 config.mjs 旧配置文件
aiastia Apr 14, 2026
f67610b
style: Vercel 风格视觉优化 - 毛玻璃导航栏/渐变Hero/卡片动效/圆角按钮
aiastia Apr 14, 2026
d741968
docs: 完善小白友好的 README,手把手教写文档
aiastia Apr 14, 2026
878bd75
add cf
aiastia Apr 14, 2026
c5af9da
cf
aiastia Apr 14, 2026
0fe2066
fix 路径
aiastia Apr 14, 2026
52a2974
毛玻璃特效修复
aiastia Apr 14, 2026
21454ef
fix: 修复移动端汉堡菜单空白 + 全面性能优化
aiastia Apr 14, 2026
67f2113
feat: switch to Teek theme with VitePress 1.x
aiastia Apr 14, 2026
73ea6c9
feat: add config switch (6 presets: doc/blog/blog-part/blog-full/blog…
aiastia Apr 14, 2026
0766bf3
fix: config switch 3x2 grid layout
aiastia Apr 14, 2026
efa8ec4
feat: add demo frontmatter (categories/tags/sticky) + friend links
aiastia Apr 14, 2026
a64c965
feat: add categories/tags/archives pages, add sticky article
aiastia Apr 15, 2026
82707c9
fix: use top: true for featured articles
aiastia Apr 15, 2026
7ca88e3
Update config.ts
aiastia Apr 15, 2026
13821ce
feat: 初始化博客 - 清理模板文档,添加 dig 和解压命令文章
aiastia Apr 20, 2026
007df11
Update config.ts
aiastia Apr 20, 2026
de11855
Update deploy.yml
aiastia Apr 20, 2026
7a95e70
read
aiastia Apr 20, 2026
234f808
fix: 重命名 dig 文章序号避免侧边栏冲突
aiastia Apr 20, 2026
bea90ed
feat: 添加 Ubuntu 常用命令文章(issue #44)
aiastia Apr 20, 2026
a632ab3
add old md
aiastia Apr 20, 2026
09a9195
fix
aiastia Apr 20, 2026
d6d2d77
fix
aiastia Apr 20, 2026
9d99019
fix
aiastia Apr 20, 2026
c0d9d12
fix
aiastia Apr 20, 2026
a5ffb9f
fix
aiastia Apr 20, 2026
d998e36
add
aiastia Apr 20, 2026
81e7ef4
fix
aiastia Apr 20, 2026
315c33b
refactor: 重组目录结构,添加 AI 提示词分类
aiastia Apr 20, 2026
a98565e
fix: 修复 AI 页面仍出现在首页的问题
aiastia Apr 20, 2026
37986d3
post: 添加 KMS 激活 Windows 文章
aiastia Apr 20, 2026
db58410
🐾 新增 Clawy 专栏 - 一个 AI 的碎碎念
Apr 20, 2026
6e37a3f
post: 补充 KMS 文章参考链接和 GVLK 密钥说明
aiastia Apr 20, 2026
532b71c
🔧 移除 AI 提示词导航,侧边栏恢复为空
Apr 20, 2026
dec54dd
📂 AI 提示词移至 posts/202304,ai/ 目录作为 Clawy 专栏首页
Apr 20, 2026
ed3db4b
feat: 启用侧边栏按年月目录分组折叠显示
aiastia Apr 20, 2026
23b88f1
feat: 侧边栏按年份倒序排列(最新在前)
aiastia Apr 20, 2026
241dc8a
fix: 侧边栏改用 array 模式 + 倒序排列
aiastia Apr 20, 2026
e05dd35
fix: 侧边栏链接补上 /posts 前缀
aiastia Apr 20, 2026
a813d45
fix: 侧边栏按路径区分,posts 和 ai 各自独立侧边栏
aiastia Apr 20, 2026
c37f8ab
feat: AI 侧边栏改为自动扫描 docs/ai/ 目录生成
aiastia Apr 20, 2026
8abb19d
refactor: 用 scan 递归函数重构 sidebarResolved,不污染原数据
aiastia Apr 20, 2026
be2359b
fix: 修复构建错误,改回 object 模式避免 sidebar not iterable
aiastia Apr 20, 2026
92d2094
ci: 改用 GitHub 原生 Pages Action 部署
aiastia Apr 20, 2026
eaa4c12
ci: 保留两种部署方式 - GitHub Actions 原生 + gh-pages 分支
aiastia Apr 20, 2026
8ce0b94
chore: update workflow branches from tree to master
aiastia Apr 20, 2026
c45a0c6
Update README.md
aiastia Apr 20, 2026
203db74
🖼️ 设置首页背景图
Apr 20, 2026
0173be4
🖼️ 背景图改用 jpg
Apr 20, 2026
1b98517
refactor: 改用 Teek 默认侧边栏配置,移除自定义 sidebarResolved 代码
aiastia Apr 20, 2026
6358a90
fix: 修复博客图片路径,.webp 改为实际存在的 .jpg
aiastia Apr 20, 2026
5c0945f
fix: 给博客预设也添加背景图片配置
aiastia Apr 20, 2026
cf71f3b
打字机的一言
aiastia Apr 20, 2026
c67aead
fix
aiastia Apr 20, 2026
56ac91a
fix 等等,你说能看到 `tk-banner-content__desc` 元素
aiastia Apr 20, 2026
f393356
测试(白屏就回滚)
aiastia Apr 20, 2026
422daa5
修复构建报错
aiastia Apr 20, 2026
3d2fbdf
fix: 修复 SSR 水合不匹配和 localStorage 报错
aiastia Apr 20, 2026
f9b12b6
fix: 用 ClientOnly 包裹 ConfigSwitch 修复 SSR 水合不匹配
aiastia Apr 20, 2026
c599118
fix: 静默 Teek 主题 SSR 水合不匹配警告
aiastia Apr 20, 2026
cb2c06d
fix
aiastia Apr 20, 2026
5163320
fix
aiastia Apr 20, 2026
9d370e6
refactor: 重写 ConfigSwitch + 清理父组件
aiastia Apr 20, 2026
28b7468
fix: 恢复博客全图模式的 body class 切换
aiastia Apr 20, 2026
8e1156d
修复语言为中文
aiastia Apr 20, 2026
0b6d84e
🎲 导航栏添加随机文章按钮(hover 旋转放大)
Apr 20, 2026
1ebf454
🎲 随机按钮:首页缓存文章链接,支持任意页面随机
Apr 20, 2026
1e4c4f9
🐛 修复随机按钮:排除首页链接
Apr 20, 2026
88328f8
☁️ 背景图改用 jsDelivr CDN
Apr 20, 2026
b5e3a62
fix pic
aiastia Apr 20, 2026
7112bb0
add pic
aiastia Apr 20, 2026
68922a9
fix: 修复切换配置时背景图不更新的问题
aiastia Apr 20, 2026
f04c58c
feat: 添加 Microsoft Clarity 站点分析
aiastia Apr 20, 2026
2f64f82
feat: 使用 Teek siteAnalytics 配置 Microsoft Clarity
aiastia Apr 20, 2026
f596970
📝 新增:tree 命令详解
Apr 20, 2026
68a11b9
📝 移动 tree 命令详解到 posts/202604
Apr 20, 2026
b9ff9e4
Delete docs/ai/tree-command.md
aiastia Apr 20, 2026
f3f2b26
Update 21-tree-command.md
aiastia Apr 20, 2026
697586f
fix: 修复文章页面刷新后内容消失的问题
aiastia Apr 20, 2026
02c6dae
fix: 用DOM操作更新背景图替代layoutKey remount,避免切换主题时文章内容消失
aiastia Apr 20, 2026
a2b7101
refactor: 用 Object.assign 就地更新 config,移除 DOM hack
aiastia Apr 20, 2026
efddcc6
fix: 切换版面时背景图不刷新 - 展开嵌套对象创建新引用触发Vue响应式更新
aiastia Apr 20, 2026
59d4f2a
fix 图片
aiastia Apr 21, 2026
6bdcaec
fix 一言
aiastia Apr 21, 2026
1a2b802
图片轮训
aiastia Apr 21, 2026
f663876
fix: 图片切换、一言功能、文章页面刷新格式修复
aiastia Apr 21, 2026
d452769
fix: 用 frontmatter 判断首页,兼容 nginx 反代和 CF Pages
aiastia Apr 21, 2026
70c380c
fix: 非首页不应用博客配置,彻底修复文章页面格式错乱
aiastia Apr 21, 2026
fc949d2
Update wrangler config name to note
cloudflare-workers-and-pages[bot] Apr 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy to gh-pages

on:
push:
branches:
- master

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 20

- run: npm install
- run: npm run docs:build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/.vitepress/dist
35 changes: 25 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,42 @@ name: Deploy Docs
on:
push:
branches:
- main
- master

permissions:
contents: write
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
deploy:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20

- run: npm install
- run: npm run docs:build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/.vitepress/dist
path: docs/.vitepress/dist

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
237 changes: 237 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
# 📝 My Docs

这是我的文档网站模板,基于 VitePress 2 构建。

> 🌐 [在线预览](https://my.aiastia.me/note/)

## ☁️ 一键部署

点击下方按钮,即可将此项目部署到对应平台(会自动 Fork 仓库并部署):

[![Deploy to Cloudflare Pages](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/aiastia123/my-docs)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/aiastia123/my-docs)
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/aiastia123/my-docs)

---

## 🚀 日常使用(只需 3 步)

### 第 1 步:写 Markdown 文件

在 `docs/` 目录下创建 `.md` 文件就行了!比如:

```
docs/guide/my-new-page.md ← 中文文档放这里
docs/en/guide/my-new-page.md ← 英文文档放这里
```

### 第 2 步:注册到侧边栏

打开 `docs/.vitepress/config.ts`,在 `sidebar` 里加一行:

```ts
// 找到对应的位置,加一行:
{ text: '我的新页面', link: '/guide/my-new-page' }
```

### 第 3 步:本地预览 & 推送

```bash
npm run docs:dev # 本地预览(浏览器打开 localhost:5173)
git add . # 添加文件
git commit -m "docs: 添加新页面"
git push # 推送到 GitHub,自动部署
```

**就这样!没有第 4 步了。**

---

## 📂 目录结构(你需要关心的部分)

```
docs/
├── guide/ ← 📖 使用指南(中文)
│ ├── getting-started.md
│ ├── configuration.md
│ └── ...在这里添加新的指南页面
├── dev/ ← 💻 开发文档(中文)
│ ├── basic.md
│ └── ...在这里添加新的开发页面
├── en/ ← 🌍 英文文档(和中文一一对应)
│ ├── guide/
│ └── dev/
└── index.md ← 🏠 首页
```

> 💡 **简单记**:中文放 `docs/guide/` 或 `docs/dev/`,英文放 `docs/en/` 对应位置。

---

## ✍️ Markdown 写法速查

写文档只需要会用 Markdown 就行,以下是常用语法:

```markdown
# 一级标题(页面大标题)

## 二级标题

### 三级标题

普通文字,**加粗**,*斜体*,`代码`

- 列表项 1
- 列表项 2

1. 有序列表 1
2. 有序列表 2

[链接文字](https://example.com)

![图片描述](./path/to/image.png)

> 这是引用/提示框

| 表头 1 | 表头 2 |
|--------|--------|
| 内容 1 | 内容 2 |

\```bash
代码块
\```

---

<!-- 提示框(VitePress 扩展语法) -->
::: tip 提示
这是一个提示框
:::

::: warning 注意
这是一个警告框
:::
```

---

## 🔧 配置文件说明

| 文件 | 作用 | 你需要改吗? |
|------|------|-------------|
| `docs/.vitepress/config.ts` | 站点配置、导航栏、侧边栏 | ✅ 添加新页面时改 |
| `docs/.vitepress/theme/style.css` | 自定义样式、颜色 | 随意 |
| `package.json` | 项目依赖 | 一般不用改 |

---

## 📋 添加新页面的完整示例

假设你要添加一个叫「API 接口」的页面:

### 1. 创建文件

创建 `docs/guide/api.md`:

```markdown
# 📡 API 接口文档

这是 API 接口的说明。

## 用户接口

### 获取用户信息

**请求地址:** \`GET /api/user\`

**返回示例:**

\```json
{
"name": "张三",
"age": 25
}
\```

::: tip 提示
需要在 Header 中携带 Token。
:::
```

### 2. 修改配置

打开 `docs/.vitepress/config.ts`,找到 `sidebar` 的中文部分:

```ts
// 在 items 数组里加一行:
{ text: '📡 API 接口', link: '/guide/api' }
```

如果要英文版,同样在 `docs/en/guide/api.md` 创建文件,并在配置的英文 sidebar 里注册。

### 3. 完成!

本地预览确认没问题后,`git push` 推送即可。

---

## 🌍 中英文对照

每个中文页面都可以有对应的英文版:

| 中文 | 英文 |
|------|------|
| `docs/guide/getting-started.md` | `docs/en/guide/getting-started.md` |
| `docs/guide/api.md` | `docs/en/guide/api.md` |
| `docs/dev/basic.md` | `docs/en/dev/basic.md` |

不需要英文版也可以,只写中文完全没问题。

---

## 🛠️ 常用命令

```bash
# 本地开发(修改后自动刷新)
npm run docs:dev

# 构建生产版本(检查有没有报错)
npm run docs:build

# 推送到 GitHub(会自动部署)
git add .
git commit -m "docs: 描述你改了什么"
git push
```

---

## ❓ 常见问题

### 页面显示 404?
检查 `config.ts` 里的 `link` 路径是否和文件路径对应(不要加 `.md` 后缀)。

### 侧边栏没有显示新页面?
需要在 `config.ts` 的 `sidebar` 里注册才会显示。

### 怎么修改网站标题/描述?
在 `config.ts` 里修改 `title` 和 `description` 字段。

### 怎么修改主题颜色?
编辑 `docs/.vitepress/theme/style.css`,修改 `--vp-c-brand-1` 等颜色变量。

### 推送后多久能看到更新?
GitHub Pages 自动部署,一般 1-3 分钟。

---

## 📦 环境要求

- [Node.js](https://nodejs.org/) 24+
- npm(Node.js 自带)

---

## 📄 License

MIT
35 changes: 0 additions & 35 deletions docs/.vitepress/config.mjs

This file was deleted.

Loading