Skip to content

Commit fbb8859

Browse files
authored
Merge pull request #9 from qianmoQ/dev-25.0.0
feat (docs): 添加文档
2 parents 1efc7c6 + d6ef680 commit fbb8859

6 files changed

Lines changed: 253 additions & 7 deletions

File tree

.github/workflows/docs.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Publish Docs
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
test:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
node-version: [ 18.x ]
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Use Node.js ${{ matrix.node-version }}
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: ${{ matrix.node-version }}
22+
23+
- name: Install pnpm
24+
uses: pnpm/action-setup@v2
25+
with:
26+
version: 8
27+
28+
- name: Get pnpm store directory
29+
shell: bash
30+
run: |
31+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
32+
33+
- uses: actions/cache@v3
34+
name: Setup pnpm cache
35+
with:
36+
path: ${{ env.STORE_PATH }}
37+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
38+
restore-keys: |
39+
${{ runner.os }}-pnpm-store-
40+
41+
- name: Install dependencies
42+
run: pnpm install
43+
44+
- name: Link package globally
45+
run: |
46+
pnpm link --global
47+
pnpm link --global pageforge
48+
49+
- name: Test build command
50+
run: |
51+
cd docs
52+
pageforge build
53+
echo 'codeforge.devlive.org' > dist/CNAME
54+
55+
- name: Deploy
56+
uses: peaceiris/actions-gh-pages@v3
57+
with:
58+
github_token: ${{ secrets.GH_TOKEN }}
59+
publish_dir: docs/dist

docs/assets/logo.svg

Lines changed: 84 additions & 0 deletions
Loading

docs/content/index.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: 欢迎使用 CodeForge
3+
template: home
4+
5+
config:
6+
sidebar: false
7+
toc: false
8+
9+
hero:
10+
title: 轻量级桌面代码执行器
11+
description: 轻量级、高性能的桌面代码执行器,专为开发者、学生和编程爱好者设计。
12+
primaryCta:
13+
url: /download.html
14+
text: 立即下载
15+
secondaryCta:
16+
url: /<%= pageData.language %>/usage/href.html
17+
text: 了解更多
18+
19+
features:
20+
subtitle: 核心优势
21+
title: 为什么选择我们
22+
description: 轻量级、高性能,专为开发者、学生和编程爱好者设计。
23+
items:
24+
- icon: >-
25+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" class="w-6 h-6 text-indigo-600">
26+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" />
27+
</svg>
28+
title: 高性能
29+
description: 可扩展的语言支持系统
30+
31+
- icon: >-
32+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" class="w-6 h-6 text-indigo-600">
33+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" />
34+
</svg>
35+
title: 操作简洁
36+
description: 一键运行代码
37+
38+
- icon: >-
39+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" class="w-6 h-6 text-indigo-600">
40+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2" />
41+
</svg>
42+
title: 易于使用
43+
description: 直观的界面设计,简单易上手
44+
45+
stats:
46+
title: 用数据说话
47+
description: 我们取得的成就
48+
items:
49+
- label: GitHub Stars
50+
value: 0+
51+
- label: Gitee Stars
52+
value: 0+
53+
- label: 正常运行时间
54+
value: 99.99%
55+
- label: 客户满意度
56+
value: 0%
57+
58+
cta:
59+
title: 准备好开始了吗?
60+
description: 立即下载,开启您的技术创新之旅
61+
button:
62+
url: /download.html
63+
text: 立即下载
64+
---

docs/pageforge.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
site:
2+
title: CodeForge
3+
description: CodeForge 是一款轻量级、高性能的桌面代码执行器,专为开发者、学生和编程爱好者设计。
4+
hiddenTitle: true
5+
keywords: CodeForge, Markdown, Python 2, Python 3, Rust
6+
logo: /assets/logo.svg
7+
favicon: assets/logo.svg
8+
baseUrl: https://codeforge.devlive.org
9+
10+
repo:
11+
owner: devlive-community
12+
name: codeforge
13+
url: https://github.com/devlive-community/codeforge
14+
branch: dev
15+
16+
footer:
17+
copyright: © 2025 CodeForge All Rights Reserved.
18+
social:
19+
github:
20+
title: GitHub
21+
href: https://github.com/devlive-community/codeforge

src-tauri/src/config.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,25 @@ use serde::{Deserialize, Serialize};
33
use std::fs;
44
use std::path::PathBuf;
55

6+
#[derive(Debug, Clone, Serialize, Deserialize)]
7+
pub struct PluginConfig {
8+
pub enabled: bool, // 插件是否启用
9+
pub execute_home: String, // 插件的执行路径
10+
pub extensions: Vec<String>, // 插件支持的文件扩展名
11+
pub language: String, // 插件所属语言
12+
pub before_compile: String, // 插件在编译前执行的命令
13+
pub after_compile: String, // 插件在编译完成后执行的命令
14+
pub run_command: String, // 插件执行的命令
15+
pub template: String, // 插件的模板
16+
}
17+
618
#[derive(Debug, Clone, Serialize, Deserialize)]
719
pub struct AppConfig {
820
pub log_directory: Option<String>,
921
pub auto_clear_logs: Option<bool>,
1022
pub keep_log_days: Option<u32>,
1123
pub theme: Option<String>,
24+
pub plugins: Option<Vec<PluginConfig>>,
1225
}
1326

1427
impl Default for AppConfig {
@@ -18,6 +31,7 @@ impl Default for AppConfig {
1831
auto_clear_logs: Some(true),
1932
keep_log_days: Some(30),
2033
theme: Some("system".to_string()),
34+
plugins: Some(vec![]),
2135
}
2236
}
2337
}

src/components/About.vue

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@
88
'scale-95 opacity-0 translate-y-4': !isVisible,
99
'scale-100 opacity-100 translate-y-0': isVisible
1010
}">
11-
<!-- 关闭按钮 -->
12-
<div class="flex justify-end mb-4">
13-
<button
14-
class="text-gray-400 hover:cursor-pointer dark:hover:text-gray-200 transition-all duration-200 hover:scale-110 rounded-full p-1 hover:bg-gray-300 dark:hover:bg-gray-700"
15-
@click="closeAbout">
16-
<X class="w-5 h-5"></X>
17-
</button>
11+
12+
<div class="flex items-center justify-between mb-6">
13+
<h2 class="text-xl font-bold text-gray-900 dark:text-white">关于 CodeForge</h2>
14+
<!-- 关闭按钮 -->
15+
<div class="flex justify-end mb-4">
16+
<button
17+
class="text-gray-400 hover:cursor-pointer dark:hover:text-gray-200 transition-all duration-200 hover:scale-110 rounded-full p-1 hover:bg-gray-300 dark:hover:bg-gray-700"
18+
@click="closeAbout">
19+
<X class="w-5 h-5"></X>
20+
</button>
21+
</div>
1822
</div>
1923

2024
<!-- 应用图标和标题 -->

0 commit comments

Comments
 (0)