Skip to content

Commit 35c1a7a

Browse files
committed
个性化博客配置:更新基本信息、添加欢迎文章、清理原作者信息
1 parent 9ca6f48 commit 35c1a7a

File tree

6 files changed

+386
-32
lines changed

6 files changed

+386
-32
lines changed

CNAME

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
huangxuan.me
1+
# 如果你有自定义域名,取消注释并填入你的域名
2+
# yourdomain.com

INSTALL_GUIDE.md

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
# 🛠️ Windows环境博客搭建完全指南
2+
3+
## 📋 准备工作
4+
5+
### 1. 安装Ruby
6+
7+
Jekyll需要Ruby环境,推荐使用RubyInstaller:
8+
9+
1. 访问 [RubyInstaller官网](https://rubyinstaller.org/downloads/)
10+
2. 下载 `Ruby+Devkit 3.1.x (x64)` 版本
11+
3. 运行安装程序,**确保勾选"Add Ruby executables to your PATH"**
12+
4. 安装完成后,在弹出的命令行窗口中选择选项 `3`(安装MSYS2和开发工具链)
13+
14+
### 2. 验证安装
15+
16+
打开新的PowerShell或命令提示符,运行:
17+
18+
```powershell
19+
ruby --version
20+
gem --version
21+
```
22+
23+
应该能看到版本信息。
24+
25+
### 3. 安装Jekyll和Bundler
26+
27+
```powershell
28+
gem install jekyll bundler
29+
```
30+
31+
## 🚀 启动博客
32+
33+
### 1. 安装项目依赖
34+
35+
在项目目录中运行:
36+
37+
```powershell
38+
cd "d:\JasonRobertDestiny.github.io"
39+
bundle install
40+
```
41+
42+
### 2. 启动本地服务器
43+
44+
```powershell
45+
bundle exec jekyll serve
46+
```
47+
48+
或者使用npm脚本:
49+
50+
```powershell
51+
npm start
52+
```
53+
54+
### 3. 预览博客
55+
56+
在浏览器中访问:[http://localhost:4000](http://localhost:4000)
57+
58+
## 📝 已完成的配置
59+
60+
我已经帮你完成了以下配置:
61+
62+
**基本信息**
63+
- 博客标题:Jason's Blog
64+
- 网站URL:https://jasonrobertdestiny.github.io
65+
- GitHub用户名:JasonRobertDestiny
66+
67+
**个人信息**
68+
- 侧边栏描述:热爱技术的程序员
69+
- 头像:GitHub头像(自动获取)
70+
71+
**清理原作者信息**
72+
- 移除了原作者的社交媒体链接
73+
- 清空了朋友链接(你可以后续添加)
74+
- 移除了Google Analytics跟踪代码
75+
76+
**创建了首篇文章**
77+
- 文件:`_posts/2025-06-25-hello-world.markdown`
78+
- 这是一篇欢迎文章,介绍了博客的用途
79+
80+
## 🔧 需要你手动完成的配置
81+
82+
### 1. 更新邮箱地址
83+
84+
编辑 `_config.yml` 文件,将 `your-email@example.com` 替换为你的真实邮箱。
85+
86+
### 2. 添加社交媒体(可选)
87+
88+
如果你有以下社交媒体账号,可以在 `_config.yml` 中添加:
89+
90+
```yaml
91+
weibo_username: 你的微博用户名
92+
zhihu_username: 你的知乎用户名
93+
twitter_username: 你的Twitter用户名
94+
```
95+
96+
### 3. 设置评论系统(可选)
97+
98+
如果需要评论功能,可以:
99+
- 注册 [Disqus](https://disqus.com/) 账号
100+
- 在 `_config.yml` 中填入 `disqus_username`
101+
102+
### 4. 设置Google Analytics(可选)
103+
104+
如果需要访问统计:
105+
- 注册 [Google Analytics](https://analytics.google.com/)
106+
- 在 `_config.yml` 中填入 `ga_track_id`
107+
108+
## 📱 GitHub Pages部署
109+
110+
### 1. 推送代码
111+
112+
```powershell
113+
git add .
114+
git commit -m "初始化个人博客"
115+
git push origin main
116+
```
117+
118+
### 2. 启用GitHub Pages
119+
120+
1. 访问你的GitHub仓库
121+
2. 进入 Settings > Pages
122+
3. 在 Source 中选择 "Deploy from a branch"
123+
4. 选择 "main" 分支
124+
5. 点击 Save
125+
126+
几分钟后,你的博客就会在 `https://jasonrobertdestiny.github.io` 上线了!
127+
128+
## 🎨 自定义建议
129+
130+
### 1. 更换背景图片
131+
132+
- 将你喜欢的图片放到 `img/` 文件夹
133+
- 在 `_config.yml` 中修改 `header-img` 字段
134+
135+
### 2. 修改配色
136+
137+
- 编辑 `less/` 文件夹中的样式文件
138+
- 运行 `grunt` 命令编译样式
139+
140+
### 3. 添加新页面
141+
142+
- 参考 `about.html` 创建新页面
143+
- 在导航栏中添加链接
144+
145+
## 🆘 常见问题
146+
147+
### Q: Ruby安装失败?
148+
A: 确保下载的是带Devkit的版本,并以管理员身份运行安装程序。
149+
150+
### Q: bundle install失败?
151+
A: 可能是网络问题,尝试:
152+
```powershell
153+
bundle config mirror.https://rubygems.org https://gems.ruby-china.com
154+
bundle install
155+
```
156+
157+
### Q: 本地预览空白?
158+
A: 检查 `_config.yml` 中的 `baseurl` 是否为空。
159+
160+
### Q: GitHub Pages部署失败?
161+
A: 检查仓库名是否为 `用户名.github.io` 格式。
162+
163+
---
164+
165+
🎉 恭喜!你的博客即将上线。记得定期更新内容哦!

SETUP.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# Jason's Blog Setup Guide
2+
3+
这是你的个人博客设置指南。
4+
5+
## 🚀 快速开始
6+
7+
### 1. 安装依赖
8+
9+
确保你已经安装了以下软件:
10+
11+
- [Ruby](https://www.ruby-lang.org/en/downloads/) (推荐版本 2.7+)
12+
- [Git](https://git-scm.com/downloads)
13+
14+
### 2. 安装 Jekyll 和 Bundler
15+
16+
```bash
17+
gem install jekyll bundler
18+
```
19+
20+
### 3. 安装项目依赖
21+
22+
在项目根目录下运行:
23+
24+
```bash
25+
bundle install
26+
```
27+
28+
### 4. 本地预览
29+
30+
启动本地服务器:
31+
32+
```bash
33+
bundle exec jekyll serve
34+
# 或者使用 npm 脚本
35+
npm start
36+
```
37+
38+
然后在浏览器中打开 [http://localhost:4000](http://localhost:4000) 预览你的博客。
39+
40+
## ✏️ 写作指南
41+
42+
### 创建新文章
43+
44+
1.`_posts` 文件夹中创建新文件
45+
2. 文件名格式:`YYYY-MM-DD-title.markdown`
46+
3. 文件开头需要包含 Front Matter:
47+
48+
```yaml
49+
---
50+
layout: post
51+
title: "文章标题"
52+
subtitle: "副标题(可选)"
53+
date: 2025-06-25 12:00:00
54+
author: "Jason"
55+
header-img: "img/post-bg-xxx.jpg"
56+
catalog: true
57+
tags:
58+
- 标签1
59+
- 标签2
60+
---
61+
```
62+
63+
### 文章模板
64+
65+
```markdown
66+
---
67+
layout: post
68+
title: "文章标题"
69+
subtitle: "副标题"
70+
date: 2025-06-25 12:00:00
71+
author: "Jason"
72+
header-img: "img/post-bg-2015.jpg"
73+
catalog: true
74+
tags:
75+
- 技术
76+
- 学习
77+
---
78+
79+
## 标题
80+
81+
文章内容...
82+
83+
### 小标题
84+
85+
更多内容...
86+
87+
```
88+
89+
## 🔧 个性化配置
90+
91+
### 修改个人信息
92+
93+
编辑 `_config.yml` 文件中的以下字段:
94+
95+
- `title`: 博客标题
96+
- `email`: 联系邮箱
97+
- `description`: 博客描述
98+
- `github_username`: GitHub 用户名
99+
- `sidebar-about-description`: 侧边栏个人描述
100+
101+
### 添加头像
102+
103+
1. 将头像图片上传到 GitHub
104+
2. 或者使用 GitHub 头像:`https://github.com/你的用户名.png`
105+
106+
### 自定义域名(可选)
107+
108+
如果你有自己的域名:
109+
110+
1. 编辑 `CNAME` 文件,填入你的域名
111+
2. 在域名提供商处设置 DNS 记录指向 GitHub Pages
112+
113+
## 📝 常用命令
114+
115+
```bash
116+
# 安装依赖
117+
bundle install
118+
119+
# 本地预览
120+
bundle exec jekyll serve
121+
122+
# 构建网站
123+
bundle exec jekyll build
124+
125+
# 清理构建文件
126+
bundle exec jekyll clean
127+
```
128+
129+
## 🌟 提示
130+
131+
1. 每次修改 `_config.yml` 后需要重启服务器
132+
2. 图片建议放在 `img` 文件夹中
133+
3. 可以使用 Markdown 语法编写文章
134+
4. 推荐使用 VSCode 等编辑器,有很好的 Markdown 支持
135+
136+
## 📚 相关资源
137+
138+
- [Jekyll 官方文档](https://jekyllrb.com/)
139+
- [Markdown 语法指南](https://www.markdownguide.org/)
140+
- [GitHub Pages 文档](https://docs.github.com/en/pages)
141+
142+
享受写作的乐趣吧! 🎉

_config.yml

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# Site settings
2-
title: Hux Blog
3-
SEOTitle: 黄玄的博客 | Hux Blog
2+
title: Jason's Blog
3+
SEOTitle: Jason的博客 | Jason's Blog
44
header-img: img/home-bg.jpg
5-
email: huxpro@gmail.com
6-
description: "这里是 @Hux黄玄 的个人博客,与你一起发现更大的世界 | 要做一个有 swag 的程序员"
7-
keyword: "黄玄, Hux黄玄, Hux, 鬼栈, huxpro, @huxpro, 黄玄的博客, Hux Blog, 博客, 个人网站, 互联网, Web, JavaScript, React, React Native, 前端, 设计"
8-
url: "https://huangxuan.me" # your host, for absolute URL
5+
email: your-email@example.com
6+
description: "这里是 @Jason 的个人博客,记录技术成长与生活感悟"
7+
keyword: "Jason, JasonRobertDestiny, 博客, 个人网站, 技术, 编程, 前端, 后端, 全栈"
8+
url: "https://jasonrobertdestiny.github.io" # your host, for absolute URL
99
baseurl: "" # for example, '/blog' if your blog hosted on 'host/blog'
1010

1111
# Publish posts or collection documents with a future date.
1212
future: true
1313

1414
# SNS settings
1515
RSS: false
16-
weibo_username: huxpro
17-
zhihu_username: huxpro
18-
github_username: huxpro
19-
twitter_username: huxpro
20-
#facebook_username: huxpro
16+
weibo_username:
17+
zhihu_username:
18+
github_username: JasonRobertDestiny
19+
twitter_username:
20+
#facebook_username:
2121
#linkedin_username: firstname-lastname-idxxxx
2222

2323
# Build settings
@@ -59,7 +59,7 @@ kramdown:
5959
start_line: 1
6060

6161
# Disqus settings
62-
disqus_username: hux
62+
disqus_username: # 如果需要评论功能,请在这里填入你的Disqus用户名
6363

6464
# Netease settings
6565
netease_comment: false
@@ -69,13 +69,13 @@ netease_comment: false
6969
# ba_track_id: [your track id]
7070

7171
# Google Analytics
72-
ga_track_id: "UA-49627206-1" # Format: UA-xxxxxx-xx
73-
ga_domain: huangxuan.me
72+
ga_track_id: # 如果需要Google分析,请填入你的GA追踪ID
73+
ga_domain: jasonrobertdestiny.github.io
7474

7575
# Sidebar settings
7676
sidebar: true # whether or not using Sidebar.
77-
sidebar-about-description: "要做一个有 swag 的程序员 <br> React Team @ Meta"
78-
sidebar-avatar: https://github.com/Huxpro.png # use absolute URL, seeing it's used in both `/` and `/about/`
77+
sidebar-about-description: "热爱技术的程序员 <br> 持续学习中..."
78+
sidebar-avatar: https://github.com/JasonRobertDestiny.png # use absolute URL, seeing it's used in both `/` and `/about/`
7979

8080
# Featured Tags
8181
featured-tags: true # whether or not using Feature-Tags
@@ -91,12 +91,6 @@ page-mathjax: false
9191
# Friends
9292
friends:
9393
[
94-
{ title: "乱序(Midare)", href: "http://mida.re/" },
95-
{ title: "Ebn Zhang", href: "https://ebnbin.dev/" },
96-
{ title: "Kun Qian", href: "http://kunq.me" },
97-
{ title: "Sherry Woo", href: "https://sherrywoo.me/" },
98-
{ title: "SmdCn", href: "http://blog.smdcn.net" },
99-
{ title: "JiyinYiyong", href: "http://tiye.me/" },
100-
{ title: "DHong Say", href: "http://dhong.co" },
101-
{ title: "尹峰以为", href: "http://ingf.github.io/" },
94+
# { title: "朋友名称", href: "https://friend-blog.com/" },
95+
# 在这里添加你的朋友链接
10296
]

0 commit comments

Comments
 (0)