Skip to content

Commit 540bd73

Browse files
big update: notes with websites enabled
1 parent 55c2d4b commit 540bd73

767 files changed

Lines changed: 13172 additions & 902 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,56 @@
1-
# 工作流名称
2-
name: 自动部署 MkDocs
1+
name: Deploy Docusaurus
32

4-
# 触发条件:推送到 main 分支
53
on:
64
push:
75
branches:
86
- main
9-
10-
# 允许手动触发
117
workflow_dispatch:
128

13-
# 设置权限
149
permissions:
15-
contents: write # 允许推送到 gh-pages 分支
10+
contents: write
1611

1712
jobs:
1813
deploy:
1914
runs-on: ubuntu-latest
2015

2116
steps:
22-
# 1. 检出代码
23-
- name: 检出仓库
17+
- name: Checkout
2418
uses: actions/checkout@v4
2519
with:
26-
fetch-depth: 0 # 获取完整历史,显示文章修改时间
20+
fetch-depth: 0
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 22
26+
27+
- name: Setup pnpm
28+
uses: pnpm/action-setup@v4
29+
with:
30+
version: 11
31+
32+
- name: Get pnpm store directory
33+
shell: bash
34+
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
2735

28-
# 2. 设置 Python
29-
- name: 设置 Python
30-
uses: actions/setup-python@v5
36+
- name: Setup pnpm cache
37+
uses: actions/cache@v4
3138
with:
32-
python-version: "3.11"
33-
cache: 'pip' # 缓存依赖,加速构建
39+
path: ${{ env.STORE_PATH }}
40+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('site/pnpm-lock.yaml') }}
41+
restore-keys: |
42+
${{ runner.os }}-pnpm-store-
3443
35-
# 3. 安装依赖
36-
- name: 安装依赖
37-
run: pip install -e ./scripts
44+
- name: Install dependencies
45+
working-directory: site
46+
run: pnpm install --frozen-lockfile
3847

39-
# 4. 构建网站
40-
- name: 构建网站
41-
run: mkdocs build --clean
48+
- name: Build website
49+
working-directory: site
50+
run: pnpm build
4251

43-
# 5. 自动部署到 gh-pages 分支(这一步会自动触发 GitHub Pages)
44-
- name: 部署到 GitHub Pages
52+
- name: Deploy to GitHub Pages
4553
uses: peaceiris/actions-gh-pages@v4
4654
with:
47-
github_token: ${{ secrets.GITHUB_TOKEN }} # GitHub 自动提供的 token
48-
publish_dir: ./site # MkDocs 构建输出目录
55+
github_token: ${{ secrets.GITHUB_TOKEN }}
56+
publish_dir: ./site/build

.gitignore

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ todo/
1515
.DS_Store
1616
Thumbs.db
1717

18-
# MkDocs
19-
site/
18+
# Dependencies
19+
node_modules/
2020

21-
# Python
22-
.venv/
23-
__pycache__/
24-
*.pyc
25-
*.egg-info/
21+
# Docusaurus (in site/)
22+
site/node_modules/
23+
site/build/
24+
site/.docusaurus/

document/booklist.md

Lines changed: 5 additions & 0 deletions

document/intro.md

Lines changed: 47 additions & 0 deletions

document/notes/_category_.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "学习笔记",
3+
"position": 2,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "阅读 Linux 内核相关书籍时整理的笔记,涵盖内核编程、设备驱动、调试技术和网络协议栈。"
7+
}
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "Linux 内核调试",
3+
"position": 3,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "Linux 内核调试 — 调试工具、崩溃分析、性能调优等排障技巧。共 93 篇。"
7+
}
8+
}

document/notes/linux_kernel_debugging/ch04_3.md

Lines changed: 1 addition & 1 deletion

document/notes/linux_kernel_debugging/ch07_3.md

Lines changed: 1 addition & 1 deletion
51.7 KB
55.4 KB

0 commit comments

Comments
 (0)