Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Publish Docs

on:
push:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.x ]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install

- name: Link package globally
run: |
pnpm link --global
pnpm link --global pageforge

- name: Test build command
run: |
cd docs
pageforge build
echo 'codeforge.devlive.org' > dist/CNAME

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: docs/dist
84 changes: 84 additions & 0 deletions docs/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions docs/content/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: 欢迎使用 CodeForge
template: home

config:
sidebar: false
toc: false

hero:
title: 轻量级桌面代码执行器
description: 轻量级、高性能的桌面代码执行器,专为开发者、学生和编程爱好者设计。
primaryCta:
url: /download.html
text: 立即下载
secondaryCta:
url: /<%= pageData.language %>/usage/href.html
text: 了解更多

features:
subtitle: 核心优势
title: 为什么选择我们
description: 轻量级、高性能,专为开发者、学生和编程爱好者设计。
items:
- icon: >-
<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">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" />
</svg>
title: 高性能
description: 可扩展的语言支持系统

- icon: >-
<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">
<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" />
</svg>
title: 操作简洁
description: 一键运行代码

- icon: >-
<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">
<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" />
</svg>
title: 易于使用
description: 直观的界面设计,简单易上手

stats:
title: 用数据说话
description: 我们取得的成就
items:
- label: GitHub Stars
value: 0+
- label: Gitee Stars
value: 0+
- label: 正常运行时间
value: 99.99%
- label: 客户满意度
value: 0%

cta:
title: 准备好开始了吗?
description: 立即下载,开启您的技术创新之旅
button:
url: /download.html
text: 立即下载
---
21 changes: 21 additions & 0 deletions docs/pageforge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
site:
title: CodeForge
description: CodeForge 是一款轻量级、高性能的桌面代码执行器,专为开发者、学生和编程爱好者设计。
hiddenTitle: true
keywords: CodeForge, Markdown, Python 2, Python 3, Rust
logo: /assets/logo.svg
favicon: assets/logo.svg
baseUrl: https://codeforge.devlive.org

repo:
owner: devlive-community
name: codeforge
url: https://github.com/devlive-community/codeforge
branch: dev

footer:
copyright: © 2025 CodeForge All Rights Reserved.
social:
github:
title: GitHub
href: https://github.com/devlive-community/codeforge
14 changes: 14 additions & 0 deletions src-tauri/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,25 @@ use serde::{Deserialize, Serialize};
use std::fs;
use std::path::PathBuf;

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct PluginConfig {
pub enabled: bool, // 插件是否启用
pub execute_home: String, // 插件的执行路径
pub extensions: Vec<String>, // 插件支持的文件扩展名
pub language: String, // 插件所属语言
pub before_compile: String, // 插件在编译前执行的命令
pub after_compile: String, // 插件在编译完成后执行的命令
pub run_command: String, // 插件执行的命令
pub template: String, // 插件的模板
}

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AppConfig {
pub log_directory: Option<String>,
pub auto_clear_logs: Option<bool>,
pub keep_log_days: Option<u32>,
pub theme: Option<String>,
pub plugins: Option<Vec<PluginConfig>>,
}

impl Default for AppConfig {
Expand All @@ -18,6 +31,7 @@ impl Default for AppConfig {
auto_clear_logs: Some(true),
keep_log_days: Some(30),
theme: Some("system".to_string()),
plugins: Some(vec![]),
}
}
}
Expand Down
18 changes: 11 additions & 7 deletions src/components/About.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@
'scale-95 opacity-0 translate-y-4': !isVisible,
'scale-100 opacity-100 translate-y-0': isVisible
}">
<!-- 关闭按钮 -->
<div class="flex justify-end mb-4">
<button
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"
@click="closeAbout">
<X class="w-5 h-5"></X>
</button>

<div class="flex items-center justify-between mb-6">
<h2 class="text-xl font-bold text-gray-900 dark:text-white">关于 CodeForge</h2>
<!-- 关闭按钮 -->
<div class="flex justify-end mb-4">
<button
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"
@click="closeAbout">
<X class="w-5 h-5"></X>
</button>
</div>
</div>

<!-- 应用图标和标题 -->
Expand Down
Loading