资源文件夹:

此功能默认是关闭的,可以通过将 站点配置文件 中的 post_asset_folder 选项改为 true 来打开。

1
2
_config.yml
post_asset_folder: true

打开 资源文件夹 功能后,Hexo会在每次执行 hexo new [layout] 命令时自动创建一个与之对应的文件夹,此文件夹拥有与对应的md文件名一样的名字,所有与文章对应用的资源都可以放在此文件夹中,当然包括图片资源。

Hexo Configuration

Docs: http://hexo.io/docs/configuration.html
Source: https://github.com/hexojs/hexo/

Site: 整站的基本信息

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
title: Edgar's Blog              # 网站的主标题
subtitle: 等待执剑少年修炼归来! # 网站副标题
description:blog | java | #网站描述,给搜索引擎用的,在生成html中的head->meta中可看到
author: Edger # 网站作者
email: # 联系邮箱
language: zh-CN # 语言

# URL # 域名和文件结构
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://xxxxx.com # 你的域名
root: /
permalink: :year/:month/:day/:title/
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code

# Writing # 写文章选项
new_post_name: :title.md # File name of new posts
default_layout: post # 默认layout方式
auto_spacing: false # Add spaces between asian characters and western characters
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
max_open_file: 100
multi_thread: true
filename_case: 0
render_drafts: false
highlight: #代码高亮
enable: true #是否启用
line_number: false #是否显示行号
tab_replace:

# Category & Tag #分类与标签

default_category: uncategorized # default
category_map:
tag_map:


archive: 1
category: 1
tag: 1

# Server #本地服务参数
## Hexo uses Connect as a server
## You can customize the logger format as defined in
## http://www.senchalabs.org/connect/logger.html
port: 4000
logger: true
logger_format:

# 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: MMM D YYYY
time_format: H:mm:ss

# Pagination #分页设置
## Set per_page to 0 to disable pagination
per_page: 10 #每页10篇文章
pagination_dir: page

# Extensions
## Plugins: https://github.com/tommy351/hexo/wiki/Plugins
## Themes: https://github.com/tommy351/hexo/wiki/Themes
## 主题
theme: yelee #modernist # raytaylorism # pacman # modernist # light
exclude_generator:

# Deployment #部署
## Docs: http://zespia.tw/hexo/docs/deploy.html
deploy:
type: github
repository: [email protected]:bruce-sha/bruce-sha.github.com.git #你的GitHub Pages仓库