Skip to content

Commit aedbf63

Browse files
committed
refactor: build site with vitepress
1 parent 157ef41 commit aedbf63

17 files changed

+2811
-135
lines changed

Diff for: .github/workflows/deploy.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build and deploy
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
docs:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 22
20+
cache: npm
21+
22+
- name: Setup Pages
23+
uses: actions/configure-pages@v4
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Build with VitePress
29+
run: npm run docs:build
30+
31+
- name: Deploy to GitHub Pages
32+
uses: crazy-max/ghaction-github-pages@v4
33+
with:
34+
target_branch: gh-pages
35+
build_dir: docs/.vitepress/dist
36+
fqdn: doocs.org
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
40+
build:
41+
runs-on: ubuntu-latest
42+
if: github.repository == 'doocs/doocs.github.io'
43+
needs: docs
44+
steps:
45+
- name: Sync to Gitee
46+
uses: wearerequired/git-mirror-action@master
47+
env:
48+
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
49+
with:
50+
source-repo: [email protected]:doocs/doocs.github.io.git
51+
destination-repo: [email protected]:Doocs/doocs.git

Diff for: .github/workflows/sync.yml

-25
This file was deleted.

Diff for: .gitignore

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
2+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
3+
4+
# dependencies
5+
/node_modules
6+
/.pnp
7+
.pnp.js
8+
9+
# testing
10+
/coverage
11+
12+
# production
13+
/build
14+
15+
# misc
16+
.DS_Store
17+
.env.local
18+
.env.development.local
19+
.env.test.local
20+
.env.production.local
21+
.vscode
22+
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
dist
28+
lib
29+
30+
node_modules
31+
32+
# Log files
33+
npm-debug.log*
34+
yarn-debug.log*
35+
yarn-error.log*
36+
37+
# Editor directories and files
38+
.idea
39+
*.suo
40+
*.ntvs*
41+
*.njsproj
42+
*.sln
43+
*.sw?
44+
45+
# VS Code
46+
47+
.temp
48+
.cache
49+
cache

Diff for: CNAME

-1
This file was deleted.

Diff for: README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ See the [中文文档](README_CN.md) for Chinese README.
1313

1414
## Sites
1515

16-
- Vercel: https://doocs.vercel.app
17-
- GitHub Pages: https://doocs.org
16+
https://doocs.org
1817

1918
## Owner
2019

Diff for: README_CN.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111

1212
## 站点
1313

14-
- Vercel: https://doocs.vercel.app
15-
- GitHub Pages: https://doocs.org
14+
https://doocs.org
1615

1716
## 发起人
1817

Diff for: docs/.vitepress/config.mts

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
// https://vitepress.dev/reference/site-config
4+
export default defineConfig({
5+
title: "Doocs",
6+
description: "Doocs open souce organization",
7+
locales: {
8+
root: {
9+
label: '简体中文',
10+
lang: 'cn',
11+
themeConfig: {
12+
// https://vitepress.dev/reference/default-theme-config
13+
nav: [
14+
{ text: '主页', link: '/' },
15+
{ text: '介绍', link: '/intro' }
16+
],
17+
search: {
18+
provider: 'local'
19+
},
20+
logo: '/favicon-32x32.png',
21+
footer: {
22+
message: 'Released under the CC-BY-SA-4.0 license.',
23+
copyright: 'Copyright © 2018-present Doocs'
24+
},
25+
socialLinks: [
26+
{ icon: 'github', link: 'https://github.com/doocs' }
27+
]
28+
}
29+
},
30+
en: {
31+
label: 'English',
32+
lang: 'en',
33+
themeConfig: {
34+
// https://vitepress.dev/reference/default-theme-config
35+
nav: [
36+
{ text: 'Home', link: '/en' },
37+
{ text: 'Introduction', link: '/en/intro' }
38+
],
39+
search: {
40+
provider: 'local'
41+
},
42+
logo: '/favicon-32x32.png',
43+
footer: {
44+
message: 'Released under the CC-BY-SA-4.0 license.',
45+
copyright: 'Copyright © 2018-present Doocs'
46+
},
47+
socialLinks: [
48+
{ icon: 'github', link: 'https://github.com/doocs' }
49+
]
50+
}
51+
}
52+
},
53+
head: [
54+
['link', { rel: 'icon', type: 'image/png', href: '/favicon-32x32.png' }],
55+
[
56+
'script',
57+
{ async: '', src: 'https://www.googletagmanager.com/gtag/js?id=G-0L5LCSTV6G' }
58+
],
59+
[
60+
'script',
61+
{},
62+
`window.dataLayer = window.dataLayer || [];
63+
function gtag(){dataLayer.push(arguments);}
64+
gtag('js', new Date());
65+
gtag('config', 'G-0L5LCSTV6G');`
66+
]
67+
],
68+
cleanUrls: true,
69+
sitemap: {
70+
hostname: 'https://doocs.org'
71+
}
72+
})

Diff for: docs/en/index.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
# https://vitepress.dev/reference/default-theme-home-page
3+
layout: home
4+
5+
hero:
6+
name: "Doocs"
7+
text: "Developer-friendly Open-source Community"
8+
actions:
9+
- theme: alt
10+
text: GitHub
11+
link: https://github.com/doocs
12+
- theme: brand
13+
text: Enter
14+
link: /en/intro
15+
16+
features:
17+
- title: advanced-java
18+
details: Comprehensive guide for Internet Java engineers, covering topics like high concurrency, distributed systems, high availability, microservices, and massive data processing.
19+
- title: leetcode
20+
details: Solutions to LeetCode problems implemented in various programming languages, including answers to "Cracking the Coding Interview (6th Edition)" and "Offer in Sword (2nd Edition)".
21+
- title: source-code-hunter
22+
details: Source code analysis of commonly used Internet component frameworks.
23+
- title: jvm
24+
details: Summary of Java Virtual Machine (JVM) internals and principles.
25+
- title: coding-interview
26+
details: Coding interview question collections, including problems from Cracking the Coding Interview and Programming Pearls.
27+
- title: md
28+
details: A highly minimalist Markdown editor for WeChat.
29+
- title: technical-books
30+
details: A list of must-read technical books.
31+
---
32+

Diff for: docs/en/intro.md

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Introduction
2+
3+
[![github](https://badgen.net/badge/>>/GitHub/cyan)](https://github.com/doocs)
4+
[![gitcode](https://badgen.net/badge/>>/GitCode/cyan)](https://gitcode.com/doocs)
5+
[![gitee](https://badgen.net/badge/>>/Gitee/cyan)](https://gitee.com/doocs)
6+
[![doocs-open-source-organization](https://badgen.net/badge/organization/join%20us/cyan)](#how-to-join)
7+
[![gitter](https://badgen.net/badge/gitter/chat/cyan)](https://gitter.im/doocs)
8+
[![license](https://badgen.net/github/license/doocs/doocs.github.io?color=green)](https://github.com/doocs/doocs.github.io/blob/main/LICENSE)
9+
10+
Hello, everyone! Welcome to the [Doocs](https://github.com/doocs) Open Source community. We are currently focusing on sharing various development-related knowledge.
11+
12+
## Sites
13+
14+
https://doocs.org
15+
16+
## Owner
17+
18+
[Yang Libin](https://github.com/yanglbme), focus on the inner workings of web applications to build out the "server-side" of web applications.
19+
20+
- Wechat: YLB0109
21+
22+
- GitHub: https://github.com/yanglbme
23+
- GitCode: https://gitcode.com/yanglbme
24+
- Gitee: https://gitee.com/yanglbme
25+
26+
27+
## Projects
28+
29+
Doocs now has the following hot projects:
30+
31+
32+
| # | Project | Description | Popularity |
33+
| --- | --- | --- | --- |
34+
| 1 | [advanced-java](https://github.com/doocs/advanced-java) | Core interview questions & answers for experienced Java(Backend) developers. | ![](https://badgen.net/github/stars/doocs/advanced-java) <br>![](https://badgen.net/github/forks/doocs/advanced-java) |
35+
| 2 | [leetcode](https://github.com/doocs/leetcode) | LeetCode solutions in any programming language. | ![](https://badgen.net/github/stars/doocs/leetcode) <br>![](https://badgen.net/github/forks/doocs/leetcode) |
36+
| 3 | [source-code-hunter](https://github.com/doocs/source-code-hunter) | Source code analysis of frameworks and components. | ![](https://badgen.net/github/stars/doocs/source-code-hunter) <br>![](https://badgen.net/github/forks/doocs/source-code-hunter) | ![](https://badgen.net/github/stars/doocs/coding-interview) <br>![](https://badgen.net/github/forks/doocs/source-code-hunter) |
37+
| 4 | [jvm](https://github.com/doocs/jvm) | A summary of the underlying principles of Java Virtual Machine. | ![](https://badgen.net/github/stars/doocs/jvm) <br>![](https://badgen.net/github/forks/doocs/jvm) |
38+
| 5 | [coding-interview](https://github.com/doocs/coding-interview) | A collection of interview questions for programmers. The main contents include ‘Coding Interviews: Questions, Analysis and Solutions’, ‘Beauty of Programming’, etc. | ![](https://badgen.net/github/stars/doocs/coding-interview) <br>![](https://badgen.net/github/forks/doocs/coding-interview) |
39+
| 6 | [md](https://github.com/doocs/md) | An online wechat markdown editor. | ![](https://badgen.net/github/stars/doocs/md) <br>![](https://badgen.net/github/forks/doocs/md) |
40+
| 7 | [technical-books](https://github.com/doocs/technical-books) | Awesome programming books list. | ![](https://badgen.net/github/stars/doocs/technical-books) <br>![](https://badgen.net/github/forks/doocs/technical-books) |
41+
42+
## How to join
43+
44+
> _If you want to go fast, go alone. If you want to go far, go together._
45+
46+
I believe many of you have a deep understanding that participating in open source projects is very helpful for personal growth. If you love open source or you are curious about it, join Doocs, work with us, maintain our projects and grow together. You can join us in the following two ways:
47+
48+
- Comment on the [relevant issue](https://github.com/doocs/doocs.github.io/issues) on GitHub to express interest in joining the community.
49+
- Send an email to [[email protected]](mailto:[email protected]?Subject=Join%20the%20Doocs%20Open%20Source%20organization) with the GitHub ID to request to join the community.
50+
51+
By default, your Doocs membership will be hidden from view aftering joining us. If you'd like to display the organization icon in your profile, you can switch from "Private" to "Public" here: https://github.com/orgs/doocs/people. We also recommend setting it to Public.
52+
53+
Once a member of the community, the member can fork any project of interest and make modifications, and then submit a pull request for review. If the submission is deemed to be in compliance with the project's standards, the member may be added as a collaborator to the project.
54+
55+
It is worth noting that initially, new members may not have direct write access to the projects, as the maintainers need to assess the quality of the submissions. Therefore, it is recommended that new members make submissions regularly to become familiar with the GitHub workflow and to improve their submissions over time.
56+
57+
You can refer to this [article](https://github.com/firstcontributions/first-contributions/blob/master/README.md) if you are a new open-source contributor.
58+
59+
Overall, the Doocs community seems to be a valuable resource for programmers interested in learning about internet backend development and open-source development. The community offers various resources and projects that can help programmers improve their skills and contribute to the open-source community.
60+
61+
Doocs is looking forward to your joining.
62+
63+
## Contributors
64+
65+
This organization exists thanks to all the people who contribute.
66+
67+
<a href="https://github.doocs.org" target="_blank"><img src="https://raw.githubusercontent.com/doocs/.github/main/images/contributors.png" /></a>
68+
69+
## Contact
70+
71+
| ![QRCode1](https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/images/qrcode-for-doocs.png) | ![QRCode2](https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/images/qrcode-for-yanglbme.png) |
72+
|:---------------------------------------------:|:---------------------------------------------:|

Diff for: docs/index.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
# https://vitepress.dev/reference/default-theme-home-page
3+
layout: home
4+
5+
hero:
6+
name: "Doocs"
7+
text: "开发者友好的开源社区"
8+
actions:
9+
- theme: alt
10+
text: GitHub
11+
link: https://github.com/doocs
12+
- theme: brand
13+
text: 进入
14+
link: /intro
15+
16+
features:
17+
- title: advanced-java
18+
details: 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务、海量数据处理等领域知识。
19+
- title: leetcode
20+
details: 多种编程语言实现 LeetCode、《剑指 Offer(第 2 版)》、《程序员面试金典(第 6 版)》题解。
21+
- title: source-code-hunter
22+
details: 互联网常用组件框架源码分析。
23+
- title: jvm
24+
details: Java 虚拟机底层原理知识总结。
25+
- title: coding-interview
26+
details: 代码面试题集,包括《剑指 Offer》、《编程之美》等。
27+
- title: md
28+
details: 一款高度简洁的微信 Markdown 编辑器。
29+
- title: technical-books
30+
details: 值得一看的技术书籍列表。
31+
---
32+

0 commit comments

Comments
 (0)