Skip to content

Commit 5617a57

Browse files
committed
feat: add docs
1 parent 73789d0 commit 5617a57

45 files changed

Lines changed: 2828 additions & 3 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build Docs
2+
on:
3+
push:
4+
branches:
5+
- master
6+
paths:
7+
- ".github/workflows/docs.yml"
8+
- "docs/**"
9+
jobs:
10+
build-and-upload:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Install dependencies
16+
run: npm run ci:docs
17+
- name: Build docs
18+
run: npm run docs:build
19+
- name: Upload docs to COS
20+
run: node scripts/upload-docs-to-cos.js

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ yarn-error.log
77
npm-debug.log
88
.history
99
.DS_Store
10+
docs/.vitepress/cache

docs/.vitepress/config.mts

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
import { defineConfig } from 'vitepress';
2+
import lightbox from 'vitepress-plugin-lightbox';
3+
4+
// https://vitepress.dev/reference/site-config
5+
export default defineConfig({
6+
title: 'Algo Bootstrap 使用文档',
7+
lang: 'zh-CN',
8+
publicPath: 'https://cdn.example.com/assets/',
9+
themeConfig: {
10+
// https://vitepress.dev/reference/default-theme-config
11+
nav: [
12+
{ text: '返回主页', link: 'https://ab.algoux.cn/' },
13+
{ text: 'algoUX Products', link: 'https://algoux.org/' },
14+
],
15+
16+
sidebar: [
17+
{
18+
text: '使用指南',
19+
items: [
20+
{ text: '概述', link: '/usages/summary' },
21+
{ text: '使用代码存放文件夹', link: '/usages/project' },
22+
{
23+
text: '使用 VS Code 编程',
24+
items: [
25+
{ text: '基本使用', link: '/usages/vscode/basic' },
26+
{ text: '代码片段', link: '/usages/vscode/snippets' },
27+
{ text: '辅助功能', link: '/usages/vscode/accessibility' },
28+
{ text: '调试', link: '/usages/vscode/debug' },
29+
],
30+
},
31+
{
32+
text: '进阶使用',
33+
items: [
34+
{ text: '设置代码初始化模板', link: '/usages/advanced/template' },
35+
{ text: 'CLI 命令', link: '/usages/advanced/cli' },
36+
],
37+
},
38+
],
39+
},
40+
{
41+
text: '常见问题',
42+
link: '/faq',
43+
},
44+
{
45+
text: '关于 Algo Bootstrap',
46+
link: '/about',
47+
},
48+
],
49+
50+
socialLinks: [{ icon: 'github', link: 'https://github.com/algoux/algo-bootstrap' }],
51+
52+
footer: {
53+
message: 'Born for Programming Beginners.',
54+
copyright: 'Copyright © 2019-present algoUX',
55+
},
56+
57+
externalLinkIcon: true,
58+
59+
darkModeSwitchLabel: '切换主题',
60+
lightModeSwitchTitle: '切换到明亮主题',
61+
darkModeSwitchTitle: '切换到暗黑主题',
62+
sidebarMenuLabel: '菜单',
63+
returnToTopLabel: '返回顶部',
64+
outlineTitle: '目录',
65+
docFooter: {
66+
prev: '上一篇',
67+
next: '下一篇',
68+
},
69+
},
70+
markdown: {
71+
config: (md) => {
72+
// Use lightbox plugin
73+
md.use(lightbox, {});
74+
},
75+
},
76+
lastUpdated: true,
77+
head: [['link', { rel: 'icon', href: '/favicon.ico' }]],
78+
});

docs/.vitepress/theme/Layout.vue

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<script setup>
2+
import DefaultTheme from 'vitepress/theme';
3+
import { onMounted } from 'vue';
4+
import { useRouter } from 'vitepress';
5+
import mediumZoom from 'medium-zoom';
6+
7+
const { Layout } = DefaultTheme;
8+
const router = useRouter();
9+
10+
// Setup medium zoom with the desired options
11+
const setupMediumZoom = () => {
12+
mediumZoom('[data-zoomable]', {
13+
background: 'transparent',
14+
});
15+
};
16+
17+
// Apply medium zoom on load
18+
onMounted(setupMediumZoom);
19+
20+
// Subscribe to route changes to re-apply medium zoom effect
21+
router.onAfterRouteChange = setupMediumZoom;
22+
</script>
23+
24+
<template>
25+
<Layout />
26+
</template>
27+
28+
<style>
29+
.medium-zoom-overlay {
30+
backdrop-filter: blur(5rem);
31+
}
32+
33+
.medium-zoom-overlay,
34+
.medium-zoom-image--opened {
35+
z-index: 999;
36+
}
37+
</style>

docs/.vitepress/theme/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import DefaultTheme from 'vitepress/theme';
2+
// @ts-ignore
3+
import Layout from './Layout.vue';
4+
5+
export default {
6+
extends: DefaultTheme,
7+
Layout,
8+
};

docs/about.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<script setup>
2+
import { VPTeamMembers } from 'vitepress/theme'
3+
4+
const members = [
5+
{
6+
avatar: '/gh-avatar-bLue.jpeg',
7+
name: 'bLue',
8+
title: 'Core Author',
9+
links: [
10+
{ icon: 'github', link: 'https://github.com/dreamerblue' },
11+
]
12+
},
13+
{
14+
avatar: '/gh-avatar-atrior.jpeg',
15+
name: 'atrior',
16+
title: 'Website Developer',
17+
links: [
18+
{ icon: 'github', link: 'https://github.com/ATRIOR-LCL' },
19+
]
20+
}
21+
]
22+
</script>
23+
24+
# 关于 Algo Bootstrap
25+
26+
Algo Bootstrap 诞生于 2019 年,是 algoUX 组织开源的跨平台桌面端应用。其初衷是帮助新手解决编程环境的配置问题,推广最现代的编程环境,替代老旧的 Dev C++、Code::Blocks 等 IDE。
27+
28+
## 开发团队
29+
30+
<VPTeamMembers size="small" :members />
31+
32+
## algoUX 产品
33+
34+
algoUX 是一个专注于编程学习与算竞工具链的开源组织。
35+
36+
Algo Bootstrap 是 algoUX 产品家族中的一员,其他产品包括:
37+
38+
- [RankLand](https://rl.algoux.cn/?utm_source=ab-docs):算法竞赛榜单合集站
39+
- [Paste then AC](https://paste.then.ac/?utm_source=ab-docs):简洁易用的云端代码剪贴板

docs/faq.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# 常见问题
2+
3+
> 持续更新中...
4+
5+
Q:为什么有时自己用 VS Code 打开文件夹后,很多功能没有了?
6+
7+
A:可能新打开的 VS Code 窗口使用了默认配置文件,而非 Algo Bootstrap 配置文件。请点击左下角的设置齿轮图标,进入「Profile」菜单,手动切换到含有 `AC``Algo Bootstrap` 字样的配置文件。
8+
9+
---
10+
11+
Q:配置环境时报错怎么办?
12+
13+
A:请使用菜单「调试」->「打开日志目录」找到日志,通过帮助渠道提供此日志文件寻求帮助。
14+
15+
---
16+
17+
Q:Algo Bootstrap 的系统要求是什么?
18+
19+
A:对于 Windows,支持 Windows 10(64 位)及更高版本;如果需要在 Windows 7 上配置,请考虑使用 Algo Bootstrap 的旧版本(`0.x`)。对于 macOS,最低支持 macOS 11 (Big Sur)。
20+
21+
---
22+
23+
Q:是否提供 Linux 版本?
24+
25+
A:由于 Linux 更多是有经验的专业用户使用,其用户群体更擅长手动配置编程环境,我们暂时不会考虑提供 Linux 版本。若要在 Linux 发行版上还原 Algo Bootstrap 的编程体验,可以导入其他平台上的 VS Code 配置文件(`AC`),对用户配置中的编译器路径字段稍作修改,即可使用。
26+
27+
---
28+
29+
Q:Algo Bootstrap 是否适合算竞熟手使用?
30+
31+
A:适合的。即使你已经是 VS Code 专业用户,依然可以使用 Algo Bootstrap 配置。对于已经安装过的编程环境(如 C/C++、Python),会跳过安装;对于 VS Code,它不会污染你已有的配置文件,而是通过注入独立的配置文件提供增强。仅 VS Code 扩展是全局安装的,因此诸如 `Error Lens` 等扩展可能会对你的默认配置造成影响,但你可以手动禁用它们。

docs/index.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
# https://vitepress.dev/reference/default-theme-home-page
3+
layout: home
4+
5+
hero:
6+
name: Algo Bootstrap
7+
tagline: 用户使用文档
8+
image: /algo-bootstrap-icon.png
9+
actions:
10+
- theme: brand
11+
text: 探索文档
12+
link: /usages/summary
13+
- theme: alt
14+
text: 常见问题
15+
link: /faq
16+
17+
features:
18+
- title: 现代的编程环境配置器
19+
details: 足够傻瓜,即使此页面不存在。
20+
- title: 为编程和算法学习设计
21+
details: 更适合初学者和算竞宝宝体质的功能和配置。
22+
- title: 来自 algoUX 产品家族
23+
details: 贡献于更好的编程与算竞工具链生态。
24+
---
78 KB
Loading

docs/public/favicon.ico

31.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)