Skip to content

Commit e52c41a

Browse files
xgopilot[bot]xgopilotNliver
authored
feat: Add public-facing website with Docusaurus (#58)
* feat: Add public-facing website with Docusaurus Implements #51 - Build a public-facing site for 1024 TechCamp **Features implemented:** - Landing page with TechCamp branding and introduction - Blog system with Markdown support - Tagging system for blog posts (AI, Go, compiler, engineering, architecture) - RSS feed support - SEO-friendly URLs - Mobile-first, responsive design - Documentation pages (intro, contributing, proposals) **Tech stack:** - Docusaurus (React-based static site generator) - TypeScript - GitHub Pages for hosting **Structure:** - `/website` - Docusaurus site - `/blog` - Blog posts - `/docs` - Documentation pages - `/src` - React components and custom pages - `/static` - Static assets **Note:** GitHub Pages deployment workflow needs to be added separately by a maintainer with workflow permissions. See website/README.md for deployment instructions. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: Nliver <[email protected]> * refactor: implement code review suggestions - Remove demo blog posts and template content - Clean up authors.yml (keep only techcamp team) - Remove tutorial directories (tutorial-basics, tutorial-extras) - Fix docusaurus.config.ts: add onBrokenMarkdownLinks, set blogSidebarCount to 10 - Fix React components: use stable keys, add aria-label for accessibility - Remove inline styles, use CSS modules with gap property - Clarify contributing.md documentation for blog vs technical articles Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: Nliver <[email protected]> --------- Co-authored-by: xgopilot <[email protected]> Co-authored-by: Nliver <[email protected]>
1 parent 660e1dc commit e52c41a

28 files changed

+19155
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,10 @@ go.work.sum
2424
# env file
2525
.env
2626
.qodo
27+
28+
# Website (Docusaurus)
29+
website/node_modules/
30+
website/.docusaurus/
31+
website/.cache-loader/
32+
website/build/
33+
website/.DS_Store

website/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

website/README.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# 1024 TechCamp Website
2+
3+
这是 1024 实训营的官方网站,使用 [Docusaurus](https://docusaurus.io/) 构建。
4+
5+
## 本地开发
6+
7+
### 安装依赖
8+
9+
```bash
10+
npm install
11+
```
12+
13+
### 启动开发服务器
14+
15+
```bash
16+
npm start
17+
```
18+
19+
此命令启动本地开发服务器并打开浏览器窗口。大多数更改会实时反映,无需重启服务器。
20+
21+
### 构建
22+
23+
```bash
24+
npm run build
25+
```
26+
27+
此命令将静态内容生成到 `build` 目录,可以使用任何静态内容托管服务提供服务。
28+
29+
## 部署
30+
31+
### GitHub Pages 自动部署
32+
33+
创建 `.github/workflows/deploy.yml` 文件(需要 workflow 权限):
34+
35+
```yaml
36+
name: Deploy to GitHub Pages
37+
38+
on:
39+
push:
40+
branches:
41+
- main
42+
workflow_dispatch:
43+
44+
permissions:
45+
contents: read
46+
pages: write
47+
id-token: write
48+
49+
concurrency:
50+
group: "pages"
51+
cancel-in-progress: false
52+
53+
jobs:
54+
build:
55+
runs-on: ubuntu-latest
56+
defaults:
57+
run:
58+
working-directory: website
59+
steps:
60+
- uses: actions/checkout@v4
61+
62+
- name: Setup Node
63+
uses: actions/setup-node@v4
64+
with:
65+
node-version: 20
66+
cache: npm
67+
cache-dependency-path: website/package-lock.json
68+
69+
- name: Install dependencies
70+
run: npm ci
71+
72+
- name: Build website
73+
run: npm run build
74+
75+
- name: Upload artifact
76+
uses: actions/upload-pages-artifact@v3
77+
with:
78+
path: website/build
79+
80+
deploy:
81+
environment:
82+
name: github-pages
83+
url: ${{ steps.deployment.outputs.page_url }}
84+
runs-on: ubuntu-latest
85+
needs: build
86+
steps:
87+
- name: Deploy to GitHub Pages
88+
id: deployment
89+
uses: actions/deploy-pages@v4
90+
```
91+
92+
### 手动部署
93+
94+
```bash
95+
GIT_USER=<Your GitHub username> npm run deploy
96+
```
97+
98+
## 添加内容
99+
100+
### 添加博客文章
101+
102+
`blog/` 目录下创建新的 Markdown 文件:
103+
104+
```markdown
105+
---
106+
slug: my-post
107+
title: 我的文章标题
108+
authors: [techcamp]
109+
tags: [tag1, tag2]
110+
---
111+
112+
文章摘要
113+
114+
<!-- truncate -->
115+
116+
文章正文...
117+
```
118+
119+
### 添加文档页面
120+
121+
`docs/` 目录下创建新的 Markdown 文件,并在 frontmatter 中指定位置:
122+
123+
```markdown
124+
---
125+
sidebar_position: 4
126+
---
127+
128+
# 页面标题
129+
130+
页面内容...
131+
```
132+
133+
## 许可证
134+
135+
Apache-2.0

website/blog/2025-01-01-welcome.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
slug: welcome-techcamp-website
3+
title: 欢迎来到 1024 TechCamp 官方网站
4+
authors: [techcamp]
5+
tags: [announcement]
6+
---
7+
8+
🎉 欢迎来到全新的 1024 TechCamp 官方网站!
9+
10+
<!-- truncate -->
11+
12+
## 关于本站
13+
14+
1024 实训营官方网站正式上线!在这里,你可以:
15+
16+
- 📖 阅读导师和学员的技术分享文章
17+
- 🎓 了解实训营的课程和项目
18+
- 💡 查看往期的技术讲座和工作坊
19+
- 🤝 参与开源社区的讨论和贡献
20+
21+
## 我们的愿景
22+
23+
我们致力于打造一个开放、实践、创新的工程师成长平台。通过:
24+
25+
- **开源公开**:过程公开,结果开源,倒逼高质量产出
26+
- **AI Native**:拥抱 AI 时代,让 AI 成为最强大的伙伴
27+
- **资深带教**:资深专家全程陪跑,坚持高工程标准
28+
29+
## 精彩内容预告
30+
31+
即将发布的内容包括:
32+
33+
- 编译器技术深度解析
34+
- AI 辅助开发实践经验
35+
- 工程实践与架构设计分享
36+
- 学员项目复盘与心得
37+
38+
敬请期待!🚀

website/blog/authors.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
techcamp:
2+
name: 1024 TechCamp Team
3+
title: 实训营团队
4+
url: https://github.com/qiniu/techcamp
5+
image_url: https://github.com/qiniu.png

website/blog/tags.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
announcement:
2+
label: 公告
3+
permalink: /announcement
4+
description: 实训营公告与通知
5+
6+
ai:
7+
label: AI
8+
permalink: /ai
9+
description: AI 相关技术文章
10+
11+
go:
12+
label: Go
13+
permalink: /go
14+
description: Go 语言相关
15+
16+
compiler:
17+
label: 编译器
18+
permalink: /compiler
19+
description: 编译器技术
20+
21+
engineering:
22+
label: 工程实践
23+
permalink: /engineering
24+
description: 工程实践与最佳实践
25+
26+
architecture:
27+
label: 架构设计
28+
permalink: /architecture
29+
description: 架构设计与系统设计

website/docs/contributing.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
sidebar_position: 2
3+
---
4+
5+
# 参与贡献
6+
7+
我们欢迎所有形式的贡献!
8+
9+
## 贡献方式
10+
11+
### 📝 内容贡献
12+
13+
分享你的技术文章和实践经验:
14+
15+
**贡献到网站博客:**
16+
1. Fork 本仓库
17+
2.`website/blog/` 目录下创建新的 Markdown 文件
18+
3. 按照 Docusaurus 博客格式编写文章(参考现有文章)
19+
4. 提交 Pull Request
20+
21+
**贡献技术分享文章:**
22+
1. Fork 本仓库
23+
2. 在仓库根目录的 `2025/` 目录下创建你的文章目录
24+
3. 编写 Markdown 格式的技术文章
25+
4. 提交 Pull Request
26+
27+
### 🐛 问题反馈
28+
29+
如果你发现任何问题或有改进建议,请:
30+
31+
1.[GitHub Issues](https://github.com/qiniu/techcamp/issues) 创建新 issue
32+
2. 详细描述问题或建议
33+
3. 如有可能,提供复现步骤
34+
35+
### 💡 功能建议
36+
37+
有好的想法?欢迎提出:
38+
39+
1. 查看现有的 [提案](https://github.com/qiniu/techcamp/issues?q=label%3Aproposal)
40+
2. 创建新的功能建议 issue
41+
3. 参与讨论和投票
42+
43+
### 🌟 社区建设
44+
45+
- 参与讨论
46+
- 回答其他人的问题
47+
- 分享你的学习心得
48+
49+
## 代码规范
50+
51+
- 遵循现有的代码风格
52+
- 提交前进行测试
53+
- 编写清晰的 commit 信息
54+
55+
## 许可证
56+
57+
本项目采用 Apache-2.0 许可证。

website/docs/intro.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# 关于 1024 实训营
6+
7+
欢迎来到 **1024 实训营**
8+
9+
## 项目简介
10+
11+
1024 实训营,由七牛云发起,致力于打造一个开放、实践、创新的工程师成长平台。我们以开源精神为基石,以工程实践为路径,以架构思维为指引,在真实项目中锤炼工程师的工匠精神。
12+
13+
在这里,你将直面真实复杂的开源项目,体验严谨的工程规范,感受架构设计的艺术,在实战中锻造工程思维,在协作中传承技术精神。
14+
15+
我们相信,优秀的工程师不仅需要扎实的技术功底,更需要追求卓越的工程精神。
16+
17+
如果你也热爱技术、渴望成长,欢迎加入我们。
18+
19+
## 项目特色
20+
21+
- **开源公开**:过程公开,结果开源,倒逼高质量产出,让优秀者容易被看见
22+
- **AI Native**:倡导 Build/Think/Code With AI,让 AI 成为你最强大的伙伴,共同创造
23+
- **技术纵深**:挑战编程语言、编译器等高技术门槛项目,技术纵深足够,切入点不设限
24+
- **资深带教**:资深专家全程陪跑,代码逐行审阅,架构反复推敲,坚持高工程标准
25+
- **全流程参与**:从定方位到架构设计再到开发实现,体验完整的产品思维和架构思维
26+
- **小团队共创**:3-5 人小组协作,激发潜能,培养团队协作和领导力
27+
28+
## 快速开始
29+
30+
查看我们的 [GitHub 仓库](https://github.com/qiniu/techcamp) 了解更多信息,或者访问 [技术博客](/blog) 阅读精彩的技术分享。

website/docs/proposals.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
sidebar_position: 3
3+
---
4+
5+
# 提案与建议
6+
7+
这里收集了实训营的各类提案和指导文档。
8+
9+
## 课程指导
10+
11+
- [定方向](https://github.com/qiniu/techcamp/blob/main/proposal/课程指导-定方向.md)
12+
13+
## 提交提案
14+
15+
如果你有新的想法或建议,欢迎:
16+
17+
1.[GitHub Issues](https://github.com/qiniu/techcamp/issues) 创建提案
18+
2. 使用 `proposal` 标签标记
19+
3. 详细描述你的想法和实现思路
20+
21+
我们会认真审阅每一个提案,优秀的提案将被采纳并实施。

0 commit comments

Comments
 (0)