Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c9000eb
feat(workspace): 多根工作区支持挂载额外文件夹 (E3 phase 1)
qianmoQ Jun 25, 2026
d899bf8
fix(workspace): 多根工作区各根改为可折叠分区,标题吸顶不再被埋在底部
qianmoQ Jun 25, 2026
4731b84
fix(workspace): 添加文件夹后自动滚动到该根分区,参考 VSCode 无需手动下滑
qianmoQ Jun 25, 2026
16e15c4
fix(workspace): 去除文件树容器顶部内边距,消除吸顶根标题上方的滚动间隙
qianmoQ Jun 25, 2026
835c69f
feat(workspace): 额外根支持右键菜单(新建/移除),并修正 Git 菜单仅作用于主仓库
qianmoQ Jun 26, 2026
c35fca8
feat(workspace): 额外根的 Git 改动徽标(各根可为独立仓库)
qianmoQ Jun 26, 2026
af06397
feat(workspace): 文件夹内搜索/替换覆盖全部工作区根
qianmoQ Jun 26, 2026
71c2be9
feat(sidebar): 新增「折叠文件夹」按钮,一键折叠文件树所有展开目录
qianmoQ Jun 26, 2026
e7ad647
feat(search): 文件树右键支持「在文件夹中搜索」,限定范围检索
qianmoQ Jun 26, 2026
a4650ae
feat(outline): 大纲按层级缩进显示,并默认选中光标所在符号
qianmoQ Jun 26, 2026
2a017c1
feat(editor): 保存时按 .editorconfig 去除行尾空白并补末尾换行
qianmoQ Jun 26, 2026
8b92937
feat(editor): 新增「自动换行」开关,长行折行显示
qianmoQ Jun 26, 2026
b2b2ecd
feat(editor): 自动换行支持快捷键(Alt+Z)与命令面板切换
qianmoQ Jun 26, 2026
9854d5f
feat(tabs): 支持重新打开已关闭标签 (Mod+Shift+T)
qianmoQ Jun 26, 2026
df7d128
feat(sidebar): 在文件树中定位当前文件 (Reveal in Explorer)
qianmoQ Jun 26, 2026
a55b909
feat(tabs): 标签右键补充「在文件树中定位/在文件管理器显示/复制相对路径」
qianmoQ Jun 26, 2026
015e713
feat(breadcrumb): 面包屑分段点击展开目录下拉,快速切换同级文件/钻入子目录
qianmoQ Jun 26, 2026
1a8b156
feat(docs): 文档站改用自建 Vite+Vue3+TS,弃用 pageforge,部署走官方 Pages Actions
qianmoQ Jun 26, 2026
937df9d
feat(docs): 重做文档站视觉,去除全部 emoji,改用专业线性图标与代码窗口样机
qianmoQ Jun 26, 2026
c4cf94e
feat(docs): 重做炫酷科技感视觉并接入 i18n(中/英)
qianmoQ Jun 26, 2026
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
60 changes: 39 additions & 21 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,59 @@
name: Publish docs via GitHub Pages
name: Deploy docs to GitHub Pages

on:
pull_request:
types: [ closed ]
push:
paths: [ 'docs/**', '.github/workflows/docs.yml' ]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

# 同一时间只跑一个部署,新提交自动取消进行中的旧部署
concurrency:
group: pages
cancel-in-progress: true

jobs:
deploy:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 22.x ]

defaults:
run:
working-directory: docs
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 10

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 22
cache: pnpm
cache-dependency-path: docs/pnpm-lock.yaml

- name: Install dependencies
run: npm install pageforge -g
run: pnpm install --frozen-lockfile

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

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: docs/dist
path: docs/dist

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 4 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
.vite
*.local
18 changes: 0 additions & 18 deletions docs/content/download.md

This file was deleted.

64 changes: 0 additions & 64 deletions docs/content/index.md

This file was deleted.

15 changes: 15 additions & 0 deletions docs/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/// <reference types="vite/client" />

declare module '*.vue' {
import type {DefineComponent} from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}

// unplugin-vue-markdown:.md 作为 Vue 组件导入,并暴露 frontmatter
declare module '*.md' {
import type {DefineComponent} from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
export const frontmatter: Record<string, any>
}
18 changes: 18 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="icon" type="image/svg+xml" href="/logo.svg"/>
<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"/>
<title>CodeForge — 轻量级桌面代码执行器</title>
<meta name="description" content="CodeForge 是一款轻量级、高性能的桌面代码执行器,专为开发者、学生和编程爱好者设计。"/>
<meta name="keywords" content="CodeForge, 代码执行器, 编辑器, Python, Rust, Git"/>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
54 changes: 0 additions & 54 deletions docs/pageforge.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions docs/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
}
File renamed without changes.
File renamed without changes
20 changes: 20 additions & 0 deletions docs/src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<template>
<div class="min-h-screen flex flex-col font-sans antialiased bg-white dark:bg-slate-950 text-slate-800 dark:text-slate-200">
<SiteHeader/>
<main class="flex-1">
<RouterView v-slot="{ Component, route }">
<DocLayout v-if="route.meta.doc">
<component :is="Component"/>
</DocLayout>
<component :is="Component" v-else/>
</RouterView>
</main>
<SiteFooter/>
</div>
</template>

<script setup lang="ts">
import SiteHeader from './components/SiteHeader.vue'
import SiteFooter from './components/SiteFooter.vue'
import DocLayout from './layouts/DocLayout.vue'
</script>
45 changes: 45 additions & 0 deletions docs/src/components/CodeWindow.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<template>
<div class="glow-border rounded-2xl animate-float">
<div class="rounded-2xl border border-white/10 bg-slate-900/80 backdrop-blur-xl shadow-2xl overflow-hidden">
<!-- 标题栏 -->
<div class="flex items-center gap-2 px-4 h-10 border-b border-white/10 bg-white/5">
<span class="w-3 h-3 rounded-full bg-red-400/90"></span>
<span class="w-3 h-3 rounded-full bg-amber-400/90"></span>
<span class="w-3 h-3 rounded-full bg-green-400/90"></span>
<span class="ml-3 text-xs text-slate-400 font-mono">main.py</span>
<span class="ml-auto text-[10px] uppercase tracking-wider text-brand-300/80">running</span>
</div>
<!-- 代码区 -->
<div class="flex font-mono text-[13px] leading-6">
<div class="select-none px-3 py-4 text-right text-slate-600 bg-white/5">
<div v-for="n in lines.length" :key="n">{{ n }}</div>
</div>
<pre class="px-4 py-4 overflow-x-auto text-slate-200"><code><template v-for="(line, i) in lines" :key="i"><span v-html="line"></span>
</template></code></pre>
</div>
<!-- 输出区 -->
<div class="border-t border-white/10 px-4 py-3 bg-black/30 font-mono text-[13px]">
<span class="text-slate-500">$</span> <span class="text-slate-400">run main.py</span>
<div class="mt-1 text-emerald-400">fib(10) = 55</div>
</div>
</div>
</div>
</template>

<script setup lang="ts">
// 手写 token 着色(暗色),避免引入运行时高亮库
const k = (s: string) => `<span class="text-violet-400">${s}</span>`
const f = (s: string) => `<span class="text-cyan-400">${s}</span>`
const n = (s: string) => `<span class="text-amber-300">${s}</span>`
const c = (s: string) => `<span class="text-slate-500">${s}</span>`

const lines = [
c('# 计算斐波那契数列'),
`${k('def')} ${f('fib')}(n):`,
` ${k('if')} n &lt; ${n('2')}:`,
` ${k('return')} n`,
` ${k('return')} ${f('fib')}(n - ${n('1')}) + ${f('fib')}(n - ${n('2')})`,
'',
`${f('print')}(${f('fib')}(${n('10')}))`
]
</script>
18 changes: 18 additions & 0 deletions docs/src/components/LangToggle.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<template>
<button class="px-2.5 py-2 rounded-lg text-sm font-medium text-slate-500 hover:text-slate-900 dark:text-slate-400 dark:hover:text-white hover:bg-slate-100 dark:hover:bg-slate-800/60 transition-colors"
:aria-label="locale === 'zh' ? 'Switch to English' : '切换到中文'"
@click="toggle">
{{ locale === 'zh' ? 'EN' : '中' }}
</button>
</template>

<script setup lang="ts">
import {useI18n} from 'vue-i18n'
import {setLocale, type Locale} from '../i18n'

const {locale} = useI18n()

const toggle = () => {
setLocale((locale.value === 'zh' ? 'en' : 'zh') as Locale)
}
</script>
23 changes: 23 additions & 0 deletions docs/src/components/SiteFooter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<template>
<footer class="border-t border-slate-200 dark:border-white/10 mt-24">
<div class="max-w-6xl mx-auto px-5 py-12 flex flex-col sm:flex-row items-center justify-between gap-5 text-sm text-slate-500 dark:text-slate-400">
<div class="flex items-center gap-2.5">
<img src="/logo.svg" alt="CodeForge" class="w-6 h-6"/>
<span class="font-medium text-slate-700 dark:text-slate-300">CodeForge</span>
<span class="text-slate-400 dark:text-slate-600">© {{ year }}</span>
</div>
<div class="flex items-center gap-6">
<a class="hover:text-brand-600 dark:hover:text-brand-400 transition-colors" href="https://github.com/devlive-community/codeforge" target="_blank" rel="noopener">GitHub</a>
<RouterLink class="hover:text-brand-600 dark:hover:text-brand-400 transition-colors" to="/download">{{ t('footer.download') }}</RouterLink>
<RouterLink class="hover:text-brand-600 dark:hover:text-brand-400 transition-colors" to="/release">{{ t('footer.releases') }}</RouterLink>
</div>
</div>
</footer>
</template>

<script setup lang="ts">
import {useI18n} from 'vue-i18n'

const {t} = useI18n()
const year = new Date().getFullYear()
</script>
Loading
Loading