feat: 初始化 OC Wiki — MkDocs Material 项目
- mkdocs.yml: 中文支持、搜索、暗色模式、Mermaid、代码高亮 - docs/: NEKO/KUMA/共享知识三分区目录结构 - GitHub Actions: 自动部署到 GitHub Pages - README.md: 用途说明、贡献指南、本地预览方法
This commit is contained in:
commit
37490a23c8
56
.github/workflows/deploy.yml
vendored
Normal file
56
.github/workflows/deploy.yml
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
name: Deploy MkDocs to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
- name: Build site
|
||||
run: mkdocs build --strict
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: site/
|
||||
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
site/
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
.cache/
|
||||
55
README.md
Normal file
55
README.md
Normal file
@ -0,0 +1,55 @@
|
||||
# 🌐 OC Wiki
|
||||
|
||||
**OC Wiki — 知识共享平台**
|
||||
|
||||
NEKO 小队和 KUMA 小队的共享知识库,使用 [MkDocs Material](https://squidfunk.github.io/mkdocs-material/) 构建。
|
||||
|
||||
🔗 **在线访问**: [https://shazhou-ww.github.io/oc-wiki/](https://shazhou-ww.github.io/oc-wiki/)
|
||||
|
||||
## 📁 目录结构
|
||||
|
||||
```
|
||||
docs/
|
||||
├── index.md # 首页
|
||||
├── neko/ # NEKO 小队文档(代码 & 工程)
|
||||
├── kuma/ # KUMA 小队文档(基础设施 & 运维)
|
||||
└── shared/ # 共享知识(跨小队通用)
|
||||
```
|
||||
|
||||
## ✍️ 如何贡献
|
||||
|
||||
1. Fork 或 Clone 本仓库
|
||||
2. 在对应目录下新建 / 编辑 Markdown 文件
|
||||
3. 如果新增页面,记得在 `mkdocs.yml` 的 `nav` 中添加条目
|
||||
4. 提交 PR,合并到 `main` 后会自动部署
|
||||
|
||||
### Markdown 特性
|
||||
|
||||
本站支持丰富的 Markdown 扩展:
|
||||
|
||||
- ✅ 代码高亮 + 复制按钮
|
||||
- ✅ Mermaid 图表
|
||||
- ✅ Admonition 提示框
|
||||
- ✅ 标签页 (Tabs)
|
||||
- ✅ 任务列表
|
||||
- ✅ Emoji 😊
|
||||
|
||||
## 🖥️ 本地预览
|
||||
|
||||
```bash
|
||||
# 安装依赖
|
||||
pip install -r requirements.txt
|
||||
|
||||
# 启动本地开发服务器
|
||||
mkdocs serve
|
||||
|
||||
# 浏览器访问 http://127.0.0.1:8000
|
||||
```
|
||||
|
||||
## 🚀 部署
|
||||
|
||||
推送到 `main` 分支后,GitHub Actions 会自动构建并部署到 GitHub Pages。
|
||||
|
||||
## 📝 License
|
||||
|
||||
MIT
|
||||
25
docs/index.md
Normal file
25
docs/index.md
Normal file
@ -0,0 +1,25 @@
|
||||
# 🏠 OC Wiki — 知识共享平台
|
||||
|
||||
欢迎来到 **OC Wiki**!这是 NEKO 小队和 KUMA 小队的共享知识库。
|
||||
|
||||
## 🐱 NEKO 小队
|
||||
|
||||
代码与工程相关的知识都在这里。
|
||||
|
||||
[:octicons-arrow-right-24: 前往 NEKO 小队](neko/index.md)
|
||||
|
||||
## 🐻 KUMA 小队
|
||||
|
||||
基础设施与运维知识都在这里。
|
||||
|
||||
[:octicons-arrow-right-24: 前往 KUMA 小队](kuma/index.md)
|
||||
|
||||
## 📚 共享知识
|
||||
|
||||
跨小队通用的知识和最佳实践。
|
||||
|
||||
[:octicons-arrow-right-24: 前往共享知识](shared/index.md)
|
||||
|
||||
---
|
||||
|
||||
> 知识就是力量,分享让力量倍增。✨
|
||||
13
docs/kuma/index.md
Normal file
13
docs/kuma/index.md
Normal file
@ -0,0 +1,13 @@
|
||||
# 🐻 KUMA 小队
|
||||
|
||||
KUMA 小队负责基础设施搭建与运维保障。
|
||||
|
||||
## 成员
|
||||
|
||||
| 成员 | 角色 | 擅长 |
|
||||
|------|------|------|
|
||||
| 🐾 毛球 | 基础设施工程师 | Linux, Docker, 网络 |
|
||||
|
||||
## 文档目录
|
||||
|
||||
_持续更新中…_
|
||||
14
docs/neko/index.md
Normal file
14
docs/neko/index.md
Normal file
@ -0,0 +1,14 @@
|
||||
# 🐱 NEKO 小队
|
||||
|
||||
NEKO 小队负责代码开发与技术方案设计。
|
||||
|
||||
## 成员
|
||||
|
||||
| 成员 | 角色 | 擅长 |
|
||||
|------|------|------|
|
||||
| 🍊 小橘 | 协调者 | 任务调度、团队协作 |
|
||||
| 🐱 汤圆 | 代码工程师 | Node.js, TypeScript, React |
|
||||
|
||||
## 文档目录
|
||||
|
||||
_持续更新中…_
|
||||
12
docs/shared/index.md
Normal file
12
docs/shared/index.md
Normal file
@ -0,0 +1,12 @@
|
||||
# 📚 共享知识
|
||||
|
||||
这里存放跨小队通用的知识、最佳实践和工具指南。
|
||||
|
||||
## 内容规划
|
||||
|
||||
- [ ] Git 工作流规范
|
||||
- [ ] 代码审查指南
|
||||
- [ ] 开发环境配置
|
||||
- [ ] 常用工具清单
|
||||
|
||||
_持续更新中…_
|
||||
89
mkdocs.yml
Normal file
89
mkdocs.yml
Normal file
@ -0,0 +1,89 @@
|
||||
site_name: OC Wiki — 知识共享平台
|
||||
site_url: https://shazhou-ww.github.io/oc-wiki/
|
||||
site_description: NEKO & KUMA 小队的共享知识库
|
||||
site_author: shazhou-ww
|
||||
repo_name: shazhou-ww/oc-wiki
|
||||
repo_url: https://github.com/shazhou-ww/oc-wiki
|
||||
|
||||
theme:
|
||||
name: material
|
||||
language: zh
|
||||
palette:
|
||||
- media: "(prefers-color-scheme: light)"
|
||||
scheme: default
|
||||
primary: teal
|
||||
accent: orange
|
||||
toggle:
|
||||
icon: material/brightness-7
|
||||
name: 切换到暗色模式
|
||||
- media: "(prefers-color-scheme: dark)"
|
||||
scheme: slate
|
||||
primary: teal
|
||||
accent: orange
|
||||
toggle:
|
||||
icon: material/brightness-4
|
||||
name: 切换到亮色模式
|
||||
font:
|
||||
text: Noto Sans SC
|
||||
code: JetBrains Mono
|
||||
features:
|
||||
- navigation.tabs
|
||||
- navigation.sections
|
||||
- navigation.expand
|
||||
- navigation.top
|
||||
- navigation.footer
|
||||
- search.suggest
|
||||
- search.highlight
|
||||
- content.code.copy
|
||||
- content.code.annotate
|
||||
icon:
|
||||
repo: fontawesome/brands/github
|
||||
|
||||
plugins:
|
||||
- search:
|
||||
lang:
|
||||
- zh
|
||||
- en
|
||||
- tags
|
||||
|
||||
markdown_extensions:
|
||||
- admonition
|
||||
- pymdownx.details
|
||||
- pymdownx.superfences:
|
||||
custom_fences:
|
||||
- name: mermaid
|
||||
class: mermaid
|
||||
format: !!python/name:pymdownx.superfences.fence_code_format
|
||||
- pymdownx.tabbed:
|
||||
alternate_style: true
|
||||
- pymdownx.highlight:
|
||||
anchor_linenums: true
|
||||
line_spans: __span
|
||||
pygments_lang_class: true
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.snippets
|
||||
- pymdownx.tasklist:
|
||||
custom_checkbox: true
|
||||
- pymdownx.emoji:
|
||||
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||
- attr_list
|
||||
- md_in_html
|
||||
- tables
|
||||
- footnotes
|
||||
- toc:
|
||||
permalink: true
|
||||
|
||||
nav:
|
||||
- 首页: index.md
|
||||
- NEKO 小队:
|
||||
- 概览: neko/index.md
|
||||
- KUMA 小队:
|
||||
- 概览: kuma/index.md
|
||||
- 共享知识:
|
||||
- 概览: shared/index.md
|
||||
|
||||
extra:
|
||||
social:
|
||||
- icon: fontawesome/brands/github
|
||||
link: https://github.com/shazhou-ww
|
||||
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
mkdocs-material>=9.5
|
||||
pymdown-extensions>=10.0
|
||||
Loading…
x
Reference in New Issue
Block a user