Skip to content

Commit b384615

Browse files
mudongliangDayuxiaoshui
authored andcommitted
Initial commit
Update README.md Add some tasks in the Assignment.md Add different stages in understanding oss make stages as bullets Add some secondary bullets for these stages adjust my outline add some introduction to open source and git basic knowledge rename the folder Add outline for Git Basics add more modules remove .DS_Store and mark it in .gitignore docs: improve README outline Signed-off-by: Zhenchen Wang <[email protected]> docs: improve outline details Signed-off-by: Zhenchen Wang <[email protected]> feat: add mkdocs framework and improve outline Signed-off-by: Zhenchen Wang <[email protected]> feat: add GitHub Actions workflow for MkDocs docs: refactored docs' file structure Add "为RustSBI贡献" in `Contributing to RustSBI` Refs: https://github.com/rustsbi/slides/blob/main/2025/reports/%E4%B8%BA%20RustSBI%20%E8%B4%A1%E7%8C%AE.md Signed-off-by: DongQing <[email protected]> fix: fix the index level Signed-off-by: Zhenchen Wang <[email protected]> feat: edited site theme fix: gh-page action delete CNAME feat: Add Git training content, Markdown extensions, and platform overview with basic operations. feat: Create initial file structure feat: Add multiple Markdown extensions to enhance documentation feat: Add platform overview and basic operations guide feat: 添加Git训练营章节及相关内容 创建文件 feat: 添加多个Markdown扩展以增强文档功能 feat: 添加代码托管平台简介及基本操作指南 feat: replace github page source from branch to action fix: remove pull_request trigger ci: add build,lint,lint-all Signed-off-by: Jianuo Kuang <[email protected]> fix: add .zhlintrc Signed-off-by: Jianuo Kuang <[email protected]> fix: change some trigers in build ,lint and lint-all Signed-off-by: Jianuo Kuang <[email protected]> fix: Correct incorrect configuration paths feat: Update code hosting platform section with platform definition and analogy, and optimize feature descriptions docs: Update code hosting platform section, improve descriptions and add GitLink platform information feat: Add .caption class styles, adjust font size and color, and optimize text alignment doc: Update code hosting platform documentation, add registration process and feature overview, feat: Add markdownlint configuration file and adjust rules to align with project requirements doc: Update practice documentation with detailed steps for creating and managing repositories docs: add detailed information to ch1/index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Update index.md Add more detailed information to the docs/ch1/index.md refactor: refactor outline and docs level Signed-off-by: Zhenchen Wang <[email protected]> Feat:Updata Open Source License Guide and improve README docs: add git introduction and commit message docs Signed-off-by: Zhenchen Wang <[email protected]> subsec1,2,3 docs:Add git basic configuration and staging area Signed-off-by: lurenjia1213 <[email protected]> docs: Completed ch1/why-oss section docs: Completed ch1_why-oss section docs: Completed ch1/why-oss section docs add 4.1.3.1 and 4.1.3.2 and 4.1.3.3 docs add 4.1.3.1 and 4.1.3.2 and 4.1.3.3 new docs: complete ch3/sec1/subsec3 1-rebase-merge and 2-control-process and 3-help-open Update mkdocs.yml docs: correct spelling of CHANGELOG
0 parents  commit b384615

Some content is hidden

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

57 files changed

+2569
-0
lines changed

.github/workflows/.zhlintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"preset": "default",
3+
"rules": {
4+
"halfwidthPunctuation": "(),。、"
5+
}
6+
}

.github/workflows/build.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.13'
17+
18+
- name: Install dependencies
19+
run: pip3 install -r requirements.txt
20+
21+
- name: Build docs
22+
run: |
23+
mkdocs -v build
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy MkDocs to GitHub Pages
2+
3+
permissions:
4+
contents: read
5+
pages: write
6+
id-token: write
7+
8+
on:
9+
push:
10+
branches:
11+
- 'main'
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
- name: Setup Pages
20+
uses: actions/configure-pages@v5
21+
- name: Install Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: '3.13'
25+
cache: 'pip'
26+
- name: Install Python Dependencies
27+
run: pip install -r requirements.txt
28+
- name: build site
29+
run: mkdocs build
30+
- name: Upload artifact
31+
uses: actions/upload-pages-artifact@v3
32+
with:
33+
path: './site'
34+
35+
deploy:
36+
runs-on: ubuntu-latest
37+
needs: build
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
steps:
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v4

.github/workflows/lint-all.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Lint All
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
13+
- name: Install zhlint
14+
run: yarn global add zhlint
15+
16+
- name: Lint all Markdown files
17+
run: |
18+
mkdir -p linted_output
19+
file_list="linted_output/file_list.txt"
20+
linted_failed_file=$(mktemp)
21+
echo 0 > "$linted_failed_file"
22+
find . -type f -name '*.md' | while read -r file; do
23+
set +e
24+
zhlint --config "$GITHUB_WORKSPACE"/.github/workflows/.zhlintrc "$file"
25+
if [ $? -ne 0 ]; then
26+
echo 1 > "$linted_failed_file"
27+
echo "$file" >> "$file_list"
28+
output_file="linted_output/report_and_suggested_fixes/$file"
29+
mkdir -p "$(dirname "$output_file")"
30+
zhlint --config "$GITHUB_WORKSPACE"/.github/workflows/.zhlintrc "$file" --output="$output_file" > "$output_file.log" 2>&1
31+
fi
32+
set -e
33+
done
34+
linted_failed=$(cat "$linted_failed_file")
35+
rm "$linted_failed_file"
36+
echo "linted_failed=$linted_failed" >> "$GITHUB_ENV"
37+
38+
- name: Upload linted Markdown
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: linted-markdown
42+
path: linted_output/
43+
44+
- name: Check lint errors
45+
run: |
46+
set -e
47+
if [ "${{ env.linted_failed }}" -ne 0 ]; then
48+
echo "Linting errors found. Please check the reports and suggested fixes in uploaded artifact."
49+
exit 1
50+
fi

.github/workflows/lint.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches:
9+
- '*'
10+
paths:
11+
- '**/*.md' # Only run on Markdown file changes
12+
13+
jobs:
14+
markdown-lint:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Install zhlint
22+
run: yarn global add zhlint
23+
24+
- name: Get changed Markdown files
25+
id: changed-files
26+
uses: tj-actions/changed-files@v45
27+
with:
28+
files: '**/*.md'
29+
30+
- name: Lint Markdown files
31+
env:
32+
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
33+
run: |
34+
mkdir -p linted_output
35+
file_list="linted_output/file_list.txt"
36+
linted_failed=0
37+
for file in ${{ env.ALL_CHANGED_FILES }}; do
38+
set +e
39+
zhlint --config "$GITHUB_WORKSPACE"/.github/workflows/.zhlintrc "$file"
40+
if [ $? -ne 0 ]; then
41+
linted_failed=1
42+
echo "$file" >> "$file_list"
43+
output_file="linted_output/report_and_suggested_fixes/$file"
44+
mkdir -p "$(dirname "$output_file")"
45+
zhlint --config "$GITHUB_WORKSPACE"/.github/workflows/.zhlintrc "$file" --output="$output_file" > "$output_file.log" 2>&1
46+
fi
47+
set -e
48+
done
49+
echo "linted_failed=$linted_failed" >> "$GITHUB_ENV"
50+
51+
- name: Upload Linted Markdown
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: linted-markdown
55+
path: linted_output/
56+
57+
- name: Check lint errors
58+
run: |
59+
set -e
60+
if [ "${{ env.linted_failed }}" -ne 0 ]; then
61+
echo "Linting errors found. Please check the reports and suggested fixes in the job [Lint Markdown files]. Otherwise, you can download report files in uploaded artifact."
62+
exit 1
63+
fi

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.DS_Store
2+
site/

.markdownlint.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"MD046": false,
3+
"MD013": false,
4+
"default": true
5+
}

Assignment.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- HCTT 文档翻译(自由选择一篇已收集的英文文档),按照 Wiki 中要求的流程完成 “翻译申请”,“翻译提交” 等操作。
2+
- 选择 Git 游戏学习方式(https://learngitbranching.js.org),当然,这个游戏也是开源在 Github 上的项目,大家也可以选择向这个仓库进行开源贡献。
3+
- 在 Github/Gitee 上创新一个账号(如果没有的话),并使用工具提交自己的第一个 commit,PR。
4+
- 在 pwn.hust.college 平台 <https://pwn.cse.hust.edu.cn> 中完成 “Linux/Unix 基本命令使用” 道馆(**待创建**)。

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 华中科技大学开放原子开源俱乐部
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# 开源软件通识课程
2+
3+
欢迎大家来到华科开放原子开源俱乐部的《开源软件通识课程》内部培训课程。本课程将秉持 “以开源方式来建设开源课程” 的指导方针,带同学们一起畅游开源软件的海洋。
4+
5+
带领俱乐部成员认识开源软件经历如下的不同阶段:
6+
7+
---
8+
9+
### **S0:无意识使用阶段**
10+
11+
> **目标:**认识到开源已融入生活,了解自己日常使用的开源软件。
12+
13+
* **开源无处不在**
14+
* 举例说明:现代科技中广泛应用的开源软件,例如 Android 系统(基于 Linux),浏览器(如 Chrome 和 Firefox),办公工具(如 LibreOffice),以及其他开发工具(如 Git、Vim、Node.js)。
15+
* 说明开源如何成为现代技术的基石:手机、服务器、云计算、大数据、人工智能等领域。
16+
* **参考任务:**
17+
* 列举自己日常使用的一些开源软件,并尝试查找它们的开源主页或仓库。
18+
* 调研一个开源项目的背景,了解它在行业中的应用(如 Linux、Kubernetes)。
19+
20+
---
21+
22+
### **S1:了解开源阶段**
23+
24+
> **目标:**初步了解开源的概念、历史、许可证及其影响,培养开源安全意识。
25+
26+
* **开源是什么?**
27+
* **开源是一种软件类型:**定义开源软件,与闭源软件对比。
28+
* **开源是一种软件开发方式:**举例开源协作的特点,如社区贡献、代码开放。
29+
* **开源是一种协作与创新模式:**讲解如何通过开源实现跨组织协作和技术创新。
30+
* **开源是一种产业生态:**开源如何驱动技术演进和形成商业生态(如红帽的成功案例)。
31+
* **开源历史**
32+
* 时间线和重要节点:Unix -> GNU -> Linux -> Git -> Github。
33+
* 自由软件运动与 Richard Stallman 的贡献。
34+
* 开源运动的兴起与 Open Source Initiative (OSI)。
35+
* **开源许可证**
36+
* 介绍许可证的作用和开源定义(Open Source Definition)。
37+
* **常见开源许可证:**
38+
* Copyleft:GPL、AGPL 等。
39+
* Permissive:MIT、Apache-2.0、BSD。
40+
* 禁用场景:禁止与专利冲突等。
41+
* **如何选择许可证?**举例如何根据项目需求选择适当的许可证。
42+
* **开源安全**
43+
* 开源软件供应链安全:了解漏洞传播机制(如 Log4j 漏洞案例)。
44+
* 安全最佳实践:开源软件的审计和管理(如使用 Dependabot)。
45+
* **参考任务:**
46+
1. 创建 Github 帐号,初始化一个简单的项目(如 README 文件)。
47+
2. 为该项目选择一个开源许可证,并撰写一段文字解释选择理由。
48+
49+
---
50+
51+
### **S2:拥抱开源阶段**
52+
53+
> **目标:**开始使用开源软件,初步了解开源项目的协作模式。
54+
55+
* **开源协作模式**
56+
* **如何贡献:**Issue、Pull Request、Code Review。
57+
* **工具与平台:**使用 Github、Gitlab 等托管平台。
58+
* **开源项目工作流:**了解从 Issue 到 PR 的完整流程。
59+
* **开源软件的替代方案**
60+
* 举例:用 Linux 替代 Windows,用 LibreOffice 替代 Microsoft Office,用 GIMP 替代 Photoshop,用 VLC 替代商业播放器。
61+
* **选择适合的发行版:**
62+
* 桌面发行版:Ubuntu、Deepin、OpenEuler。
63+
* 服务器发行版:CentOS Stream、Alpine。
64+
* **活动组织**
65+
* 了解和参与开源社区活动:如 Linux 101、OpenEuler 社区活动等。
66+
* 通过参与活动了解更多开源工具和资源。
67+
* **参考任务:**
68+
1. 找到一个可以替换闭源工具的开源软件,并将其应用到日常工作中。
69+
2. 记录切换开源软件的过程、问题和解决方案,撰写一篇博客分享。
70+
71+
---
72+
73+
### **S3:贡献开源阶段**
74+
75+
> **目标:**学习开源基础技能并通过代码或文档的贡献实践开源。
76+
77+
* **开源基础技能**
78+
* **Git 学习:**
79+
* Git 的基本操作(clone、commit、push、pull、merge 等)。
80+
* Git 的原理:分支、HEAD 指针、合并冲突等概念。
81+
* 进阶技能:使用 Git 提交签名、提交模板。
82+
* **代码托管平台:**
83+
* Github、Gitlab、Gitee 等的使用技巧。
84+
* 项目管理功能:Issue、Milestone、Wiki。
85+
* **如何写好一个 commit message:**
86+
* Linux Kernel Patch。
87+
* Conventional Commits。
88+
* RustSBI 项目的 commit message 规范。
89+
* **文档撰写:**
90+
* **计算机基础知识**
91+
* The Missing Semester of Your CS Education。
92+
* **不同方向的简单介绍与开源项目:**
93+
* 系统开发:Linux Kernel、QEMU。
94+
* Web 开发:React、Vue。
95+
* 网络:WireGuard、Cilium。
96+
* 数据分析:Pandas、Jupyter。
97+
* 人工智能:TensorFlow、PyTorch。
98+
* 找到适合自己的方向并选择活跃的开源项目。
99+
* **表达与交流的重要性**
100+
* 如何清晰表达问题和想法。
101+
* 如何有效进行跨文化交流。
102+
* **学会如何提问**
103+
* 如何查找资料:善用 Google 和 Stack Overflow。
104+
* 提问的基本规范:明确描述问题、给出复现步骤。
105+
* **参考任务:**
106+
1. 学习使用 Git,完成一次 Fork 并提交 PR 的流程。
107+
2. 选择一个开源项目,通过贡献文档或代码提交一个 PR。
108+
109+
---
110+
111+
### **S4:领导开源阶段**
112+
113+
> **目标:**成为开源项目的领导者,掌握社区管理和开源治理能力。
114+
115+
* **开源社区及其管理**
116+
117+
* 如何组织和维护开源社区:Code of Conduct、贡献者指南。
118+
* 如何吸引和管理贡献者:鼓励多样性和贡献。
119+
* **开源社区安全治理**
120+
121+
* 如何处理安全问题(如 CVE 报告)。
122+
* 如何保护社区免受恶意代码或行为影响。
123+
* **开源社区合规**
124+
125+
* 合规流程的重要性:知识产权管理、许可证合规。
126+
* 如何进行开源项目的合规审计。
127+
* **参考任务:**
128+
129+
1. 创建一个开源项目,撰写清晰的 README 和贡献者指南。
130+
2. 通过自己的开源项目吸引其他人贡献并管理他们的贡献。
131+
3. 如果不想长期维护,可以将项目捐献到俱乐部。
132+
133+
134+
### **贡献指南**
135+
如果 commit 时候遇到 md 格式问题,在对应的 action run 底下会有一个 artifact,保存了所有的 log 和对应的 autofix
136+
commit message 中尽量不要出现中文,以及相同的 commit 可以合并成一个。

0 commit comments

Comments
 (0)