🖼 所有搭建博客的汇总在这里:Blog全程搭建,示例🚀test.ruiqingyan.com

🌺 之后所有的操作都在Webstrom进行,需要的可以点进去看看

主要配置根目录下的_config.yml,这里我在代码加了中文注释,可以直接copy做自己配置文件(注意换成自己的),这部分内容建议自己看一遍,不懂也没关系有个印象

2405.1.根目录下_config.yml

第0部分的server端口号不要重复,可以自己设置

第1部分的核心内容写自己的

第2部分的网址url写自己的,这个会出现在之后文章页的分析根

第8部分配置主题

第9部分推送仓库写自己的

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# 0、部署本地的端口号,默认4000,如果多个的话要避开重复的端口
# 访问端口,默认localhost:4000,设置后访问端口localhost:4001
server:
port: 4001

# 1、Site 核心内容
title: 花夕 & Blog #网站标题
subtitle: '远赴人间惊鸿宴,一睹人间盛世颜' #网站的副标题
description: '远赴人间惊鸿宴,一睹人间盛世颜' #简介或者格言
keywords: #关键词
author: 花夕 #作者
language: zh-CN #主题语言
timezone: 'Asia/Shanghai' #中国的时区

# 2、网址URL(推荐改url,不推荐改permalink)
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: https://ruiqingyan.com # 页面底部分享的url(就是做好博客之后每页都有分享页面)
permalink: :year/:month/:day/:title/ # 文章的永久链接格式
permalink_defaults: # 永久链接中每个段的默认值
pretty_urls:
trailing_index: true # 尾随index.html,设置为false以删除它 true
trailing_html: true # 跟踪.html,设置为false以删除它(不适用于跟踪index.html) true

# 3、文档管理,一般不动
source_dir: source # 源文件夹。您的内容存储在哪里 source
public_dir: public # 公共文件夹。在哪里生成静态站点 public
tag_dir: tags # 标签目录 tags
archive_dir: archives # 存档目录 archives
category_dir: categories # 类别目录 categories
code_dir: downloads/code # 包括代码目录(source_dir的子目录)
i18n_dir: :lang # i18n目录 :lang
skip_render: # 将复制到public原始的路径,而不被渲染。您可以使用glob表达式进行路径匹配。
#skip_render:“我的页面/**/*” 将在不更改的情况下输出`source/mypage/index.html`和`source/mypage/code.js`。
## skip_render:“_posts/test-post.md” 这也可以用来排除帖子,#将忽略`source/_posts/test-post.md`。

# 4、写作,一般不动
new_post_name: :title.md #新帖子的文件名格式
default_layout: post #默认布局
titlecase: false #将标题转换为标题案例
external_link:
enable: true #在新选项卡中打开外部链接
field: site #仅适用于整个site或post
exclude: '' #排除主机名。在适用时指定子域,包括www
filename_case: 0 #将文件名转换为1小写;2大写
render_drafts: false #显示草稿
post_asset_folder: false #资产文件夹
relative_link: false #制作相对于根文件夹的链接
future: true
syntax_highlighter: highlight.js
highlight: #代码块语法高亮显示设置
line_number: true
auto_detect: false
tab_replace: ''
wrap: true
hljs: false
prismjs: #代码块语法高亮显示设置
enable: false
preprocess: true
line_number: true
tab_replace: ''

# 5、主页设置
# 一般不动
index_generator: #生成帖子存档
path: ''
per_page: 10 #每页显示的帖子
order_by: -date #帖子订单。默认情况下,按降序日期(从新到旧)排序
# pagination_dir: 'page' #显示在page下的页面数量(新版删了)

# 7、分页
# 一般不动
per_page: 10 #每页显示贴子数目
pagination_dir: page #格式url

# 8、主题
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: butterfly

# 9、推送仓库,Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
type: git
repository: https://github.com/ruiqingyan1/ruiqingyan1.github.io.git #你的仓库地址
branch: master

### 10、一些其他
# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## updated_option supports 'mtime', 'date', 'empty'
updated_option: 'mtime'

# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore: