Skip to content

Commit 31baec5

Browse files
committed
refactor: use vitepress to build website
1 parent 6faa351 commit 31baec5

File tree

11 files changed

+1538
-3355
lines changed

11 files changed

+1538
-3355
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,23 @@ jobs:
1717
- name: Setup Node.js
1818
uses: actions/setup-node@v4
1919
with:
20-
node-version: latest
20+
node-version: 22
21+
cache: npm
22+
23+
- name: Setup Pages
24+
uses: actions/configure-pages@v4
2125

2226
- name: Install dependencies
23-
run: npm install
27+
run: npm ci
2428

25-
- name: Build VuePress site
26-
run: yarn docs:build
29+
- name: Build with VitePress
30+
run: npm run docs:build
2731

2832
- name: Deploy to GitHub Pages
2933
uses: crazy-max/ghaction-github-pages@v4
3034
with:
3135
target_branch: gh-pages
32-
build_dir: docs/.vuepress/dist
36+
build_dir: docs/.vitepress/dist
3337
fqdn: jvm.doocs.org
3438
env:
3539
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,5 @@ yarn-error.log*
4545
# VS Code
4646

4747
.temp
48-
.cache
48+
.cache
49+
cache

docs/.vitepress/config.mts

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
// https://vitepress.dev/reference/site-config
4+
export default defineConfig({
5+
title: "JVM 底层原理最全知识总结",
6+
description: "Doocs 开源社区",
7+
themeConfig: {
8+
// https://vitepress.dev/reference/default-theme-config
9+
nav: [
10+
{ text: '首页', link: '/' },
11+
],
12+
search: {
13+
provider: 'local'
14+
},
15+
footer: {
16+
message: 'Released under the CC-BY-SA-4.0 license.',
17+
copyright: 'Copyright © 2018-present Doocs'
18+
},
19+
logo: '/favicon.ico',
20+
docFooter: {
21+
prev: '上一页',
22+
next: '下一页'
23+
},
24+
sidebar: [
25+
{
26+
items: [
27+
{
28+
'text': '开始学习',
29+
'link': '/00-quickstart'
30+
},
31+
{
32+
'text': 'JVM 内存结构',
33+
'link': '/01-jvm-memory-structure'
34+
},
35+
{
36+
'text': 'HotSpot 虚拟机对象探秘',
37+
'link': '/02-hotspot-jvm-object',
38+
},
39+
{
40+
'text': '垃圾收集策略与算法',
41+
'link': '/03-gc-algorithms'
42+
},
43+
{
44+
'text': 'HotSpot 垃圾收集器',
45+
'link': '/04-hotspot-gc'
46+
},
47+
{
48+
'text': '内存分配与回收策略',
49+
'link': '/05-memory-allocation-gc'
50+
},
51+
{
52+
'text': 'JVM 性能调优',
53+
'link': '/06-jvm-performance-tuning'
54+
},
55+
{
56+
'text': '类文件结构',
57+
'link': '/07-class-structure'
58+
},
59+
{
60+
'text': '类加载的时机',
61+
'link': '/08-load-class-time'
62+
},
63+
{
64+
'text': '类加载的过程',
65+
'link': '/09-load-class-process'
66+
},
67+
{
68+
'text': '类加载器',
69+
'link': '/10-class-loader'
70+
}
71+
],
72+
},
73+
],
74+
75+
socialLinks: [
76+
{ icon: 'github', link: 'https://github.com/doocs/jvm' }
77+
]
78+
}
79+
})

docs/.vuepress/config.js

Lines changed: 0 additions & 67 deletions
This file was deleted.

docs/00-quickstart.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
# 开始学习
22

3-
<a href="https://github.com/doocs/jvm/actions?query=workflow%3ASync"><img src="https://github.com/doocs/jvm/workflows/Sync/badge.svg"></a>
4-
<a href="https://github.com/doocs/jvm/blob/main/LICENSE"><img src="https://badgen.net/github/license/doocs/jvm?color=green" alt="license"></a>
5-
<a href="https://github.com/doocs/jvm/issues"><img src="https://badgen.net/github/open-issues/doocs/jvm" alt="issues"></a>
6-
<a href="https://github.com/doocs/jvm/stargazers"><img src="https://badgen.net/github/stars/doocs/jvm" alt="stars"></a>
7-
<a href="https://github.com/doocs/jvm"><img src="https://badgen.net/badge/⭐/GitHub/blue" alt="github"></a>
8-
<a href="https://gitee.com/doocs/jvm"><img src="https://badgen.net/badge/⭐/Gitee/blue" alt="gitee"></a>
9-
<a href="http://makeapullrequest.com"><img src="https://badgen.net/badge/PRs/welcome/cyan" alt="PRs Welcome"></a>
10-
<a href="https://github.com/doocs/doocs.github.io"><img src="https://badgen.net/badge/organization/join%20us/cyan" alt="open-source-organization"></a>
11-
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fdoocs%2Fjvm?ref=badge_shield" alt="FOSSA Status"><img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Fdoocs%2Fjvm.svg?type=shield"/></a>
12-
133
这里仅仅记录了一些笔者认为需要重点掌握的 JVM 知识点,如果你想更加全面地了解 JVM 底层原理,可以阅读周志明老师《深入理解 Java 虚拟机——JVM 高级特性与最佳实践(第 2/3 版)》全书。
144

155
## 清单
@@ -67,16 +57,8 @@ Doocs 技术社区,致力于打造一个内容完整、持续成长的互联
6757

6858
[Doocs](https://github.com/doocs) 技术社区旗下唯一公众号「**Doocs**」​,欢迎扫码关注,**专注分享技术领域相关知识及行业最新资讯**。当然,也可以加我个人微信(备注:GitHub),拉你进技术交流群。
6959

70-
<table>
71-
<tr>
72-
<td align="center" style="width: 260px;">
73-
<img src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/images/qrcode-for-doocs.png" style="width: 400px;"><br>
74-
</td>
75-
<td align="center" style="width: 260px;">
76-
<img src="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/images/qrcode-for-yanglbme.png" style="width: 400px;"><br>
77-
</td>
78-
</tr>
79-
</table>
60+
| ![QRCode 1](https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/images/qrcode-for-doocs.png) | ![QRCode 2](https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/images/qrcode-for-yanglbme.png) |
61+
|:--------------------------------------------:|:---------------------------------------------:|
8062

8163
关注「**Doocs**」公众号,回复 **JVM**,即可获取本项目离线 PDF 文档,学习更加方便!
8264

docs/README.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

docs/index.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
# https://vitepress.dev/reference/default-theme-home-page
3+
layout: home
4+
5+
hero:
6+
name: "JVM 底层原理最全知识总结"
7+
tagline:
8+
actions:
9+
- theme: brand
10+
text: 开始学习
11+
link: /00-quickstart
12+
- theme: alt
13+
text: 作者主页
14+
link: https://github.com/yanglbme
15+
16+
features:
17+
- title: JVM 内存结构
18+
details: 程序计数器、Java 虚拟机栈、本地方法栈、堆、方法区...
19+
- title: HotSpot 虚拟机对象探秘
20+
details: 对象内存布局、创建过程、访问方式
21+
- title: 垃圾收集策略与算法
22+
details: 判断对象是否存活、引用种类、垃圾收集算法
23+
- title: HotSpot 垃圾收集器
24+
details: 新生代、老年代、G1 通用垃圾收集器
25+
- title: 内存分配与回收策略
26+
details: 对象分配、大对象、动态对象年龄判定、空间分配担保
27+
- title: JVM 性能调优
28+
details: 使用 64 位 JDK 管理大内存、使用 32 位 JVM 建立逻辑集群
29+
- title: 类文件结构
30+
details: 魔数、版本信息、常量池、访问标志、类索引、字段表、方法表...
31+
- title: 类加载的时机
32+
details: 类的生命周期、类加载过程初始化时机、接口加载过程
33+
- title: 类加载的过程
34+
details: 加载、验证、准备、解析、初始化
35+
- title: 类加载器
36+
details: 类与类加载器、双亲委派模型工作过程
37+
---
38+

docs/summary.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)