mirror of
https://github.com/codexu/note-gen.git
synced 2026-06-20 03:07:28 +08:00
feat: workflow
This commit is contained in:
7
.github/workflows/updateDocs.yml
vendored
7
.github/workflows/updateDocs.yml
vendored
@@ -34,10 +34,9 @@ jobs:
|
||||
- name: deploy #部署
|
||||
uses: peaceiris/actions-gh-pages@v3 #和上面一样,这里使用的是他人写好的插件库,作用是发布到其他仓库中或者其他分支上,想要具体了解可以在插件库中搜索
|
||||
with:
|
||||
deploy_key: ${{ secrets.DOC }} # key
|
||||
external_repository: hahaxiaowai/note-gen #推送到该仓库中,地址格式为github名称/仓库名
|
||||
publish_branch: gh-page #分支名
|
||||
publish_dir: dist #要推送的内容(打包后的博客文件夹)
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: docs/.vitepress/dist #要推送的内容(打包后的博客文件夹)
|
||||
publish_branch: gh-pages #分支名
|
||||
# - name: deploy aliyun # 为 step 指定一个名称,将会在 github action 的控制台中显示
|
||||
# uses: easingthemes/ssh-deploy@v5.0.3 #可以访问的仓库,实现的上传服务器步骤被封装在此action
|
||||
# env:
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -43,3 +43,5 @@ yarn-error.log*
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
docs/.vitepress/dist
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
const assets = ref(null)
|
||||
const version =ref(null)
|
||||
getLatestRelease('codexu','note-gen').then(res =>{
|
||||
assets.value = res
|
||||
version.value =res.name
|
||||
if(res) {
|
||||
assets.value = res
|
||||
version.value =res.name
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -89,7 +89,6 @@ Scan the QR code to join the [discussion group](https://github.com/codexu/note-g
|
||||
|
||||
## Contribute
|
||||
|
||||
- [Read contribution guide](CONTRIBUTING.md)
|
||||
- [Update plans](https://github.com/codexu/note-gen/issues/46)
|
||||
- [Submit bugs or improvement suggestions](https://github.com/codexu/note-gen/issues)
|
||||
- [Discussions](https://github.com/codexu/note-gen/discussions)
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
const assets = ref(null)
|
||||
const version = ref(null)
|
||||
getLatestRelease('codexu', 'note-gen').then(res => {
|
||||
assets.value = res
|
||||
version.value = res.name
|
||||
if(res) {
|
||||
assets.value = res
|
||||
version.value =res.name
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -89,7 +89,6 @@ NoteGenコミュニティグループに参加して、質問をしたり、使
|
||||
|
||||
## 貢献
|
||||
|
||||
- [貢献ガイドを読む](CONTRIBUTING.md)
|
||||
- [更新計画](https://github.com/codexu/note-gen/issues/46)
|
||||
- [バグや改善提案を提出する](https://github.com/codexu/note-gen/issues)
|
||||
- [ディスカッション](https://github.com/codexu/note-gen/discussions)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"docs:dev": "vitepress dev",
|
||||
"docs:build": "vitepress build",
|
||||
"build": "vitepress build",
|
||||
"docs:preview": "vitepress preview"
|
||||
},
|
||||
"keywords": [],
|
||||
|
||||
92
docs/zh/CONTRIBUTING.md
Normal file
92
docs/zh/CONTRIBUTING.md
Normal file
@@ -0,0 +1,92 @@
|
||||
# 贡献指南
|
||||
|
||||
💗 NoteGen 是一个开源且免费的社区项目,我们将持续为爱发电,并接受任何形式的贡献。 💗
|
||||
|
||||
---
|
||||
|
||||
Hi! 非常感谢你参与 NoteGen 的贡献!在此之前,请花一些时间阅读以下内容:
|
||||
|
||||
## 如何贡献
|
||||
|
||||
不论是贡献代码还是提交问题,都应该先创建 Issue。
|
||||
|
||||
### Issues
|
||||
|
||||
请始终使用 https://github.com/codexu/note-gen/issues 创建新问题,尽量详细描述问题,包括重现步骤、预期行为和实际行为。
|
||||
|
||||
### Discussions
|
||||
|
||||
如果你想发起讨论,可以使用 https://github.com/codexu/note-gen/discussions,或加入 [交流群](https://github.com/codexu/note-gen/discussions/110)。
|
||||
|
||||
### Pull Request
|
||||
|
||||
- 在修复 bug 前,请先检查 issues 是否具有相同的问题。
|
||||
- 如果你要开发一个功能,请先提交 issue,与项目维护者讨论该功能是否被需要,这有助于节省维护者和贡献者的时间。
|
||||
|
||||
## 技术栈
|
||||
|
||||
NoteGen 主要用到以下几个技术栈:
|
||||
|
||||
- [Tauri 2](https://v2.tauri.app/)
|
||||
- [Next.js 15](https://nextjs.org/)
|
||||
- [shadcn-ui](https://ui.shadcn.com/)
|
||||
- [tailwindcss](https://tailwindcss.com/)
|
||||
|
||||
- 查看 [package.json](https://github.com/codexu/note-gen/blob/dev/package.json) 中前端依赖包。
|
||||
- 查看 [src-tauri/Cargo.toml](https://github.com/codexu/note-gen/blob/dev/src-tauri/Cargo.toml) 中 Rust 依赖包。
|
||||
|
||||
如果你本次贡献需要更新或添加依赖,请在 issue 中添加 `package.json` 或 `src-tauri/Cargo.toml` 的更新说明。
|
||||
|
||||
## 开发环境
|
||||
|
||||
请先阅读 [Tauri 2 前置要求](https://v2.tauri.app/zh-cn/start/prerequisites/) 文档,按照文档要求配置开发环境。
|
||||
|
||||
环境装好后,**fork** 仓库到你的 GitHub 账号下,然后克隆到本地:
|
||||
|
||||
```bash
|
||||
# 1. fork 到你的 GitHub 账号下
|
||||
|
||||
# 2. 克隆到本地
|
||||
git clone https://github.com/your-username/note-gen.git
|
||||
```
|
||||
|
||||
然后进入项目目录,安装依赖:
|
||||
|
||||
```bash
|
||||
# 3. 进入项目目录 & 安装依赖
|
||||
cd note-gen
|
||||
pnpm install
|
||||
|
||||
# 4. 启动本地开发,如果遇到白屏情况,尝试右键 reload。
|
||||
pnpm tauri dev
|
||||
```
|
||||
|
||||
## 目录说明
|
||||
|
||||
- `src`:前端应用目录。
|
||||
- `apps`:前端应用目录。
|
||||
- `core`:主应用核心功能目录。
|
||||
- `article`:写作。
|
||||
- `image`:图床管理。
|
||||
- `record`: 记录。
|
||||
- `search`:搜索。
|
||||
- `setting`:设置。
|
||||
- `screenshot`:截图窗口。
|
||||
- `components`:组件目录,shadcn 和通用组件。
|
||||
- `lib`:常用工具库,例如 ai、github 请求等。
|
||||
- `db`:SQLite 数据库。
|
||||
- `store`:状态管理目录,采用 zustand。
|
||||
- `src-tauri`:Rust 代码目录。
|
||||
- `messages`:多语言配置目录。
|
||||
|
||||
## Pull Request 指南
|
||||
|
||||
NoteGen 未使用 master 或 main 分支,一切发开都在 dev 分支下进行,通过合并到 release 分之后触发 Github Action 进行版本发布和构建。
|
||||
|
||||
Fork 仓库后,请使用 dev 分支创建一个新的分支,命名为本次贡献的名称,例如 `fix/123` 或 `feat/121`。
|
||||
|
||||
你可以多次提交代码,直到完成所有修改,在提交 Pull Request 时,我们会通过 `Squash and Merge` 合并成一个提交。
|
||||
|
||||
请在 PR 标题中添加 `fix(#xxx): ***` 或 `feat(#xxx): ***`,#xxx 是 issue 编号,例如 [NoteGen 更新计划 #46](https://github.com/codexu/note-gen/issues/46)。
|
||||
|
||||
在提交 PR 前,确保本地运行 `pnpm tauri build` 可以正常构建及运行。
|
||||
@@ -14,7 +14,9 @@
|
||||
const assets = ref(null)
|
||||
const version =ref(null)
|
||||
getLatestRelease('codexu','note-gen').then(res =>{
|
||||
assets.value = res
|
||||
version.value =res.name
|
||||
if(res) {
|
||||
assets.value = res
|
||||
version.value =res.name
|
||||
}
|
||||
})
|
||||
</script>
|
||||
@@ -7,7 +7,8 @@
|
||||
"build": "next build",
|
||||
"start": "next start -p 3456",
|
||||
"lint": "next lint",
|
||||
"tauri": "tauri"
|
||||
"tauri": "tauri",
|
||||
"docs:build": "npm --prefix ./docs run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@codemirror/commands": "^6.7.1",
|
||||
@@ -93,4 +94,4 @@
|
||||
"tailwindcss": "^3.4.1",
|
||||
"typescript": "^5"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user