###普通的操作:
生成静态页面1
hexo g
本地预览1
hexo s
部署到远程1
hexo d
创建一个页面1
hexo n page "页面的名字"
创建一篇博客1
hexo n "博客名字"
主题设置
landscape主题(当前本人的主题)
更改背景图
G:\my-blog\themes\landscape\source\css\images\banner.png
替换自己想要的背景图
更换title
在根目录下的_config.yml配置文件中,大部分配置都在这
我只更改了一点点,因为很多还不懂,还在摸索中,全部贴出来。对比查看: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# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: Xiey94
subtitle: Time Fly So Fast
description: 学教于此,宾至如归
author: xiey94
email: xiey94@qq.com
# 修改此处,一般默认为default.yml,原生英文显示
language: zh-CN
timezone:
# http://img1.imgtn.bdimg.com/it/u=3681740639,2606084028&fm=27&gp=0.jpg
avatar: /images/QQ.png
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://yoursite.com
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:
# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:
# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace:
# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
path: ''
per_page: 10
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# 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
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: landscape
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repo: https://github.com/xieyang94/xieyang94.github.io.git
branch: master
更换主题:
- 找到对应的主题
- git下来到themes目录中
- 在上面那个配置文件的theme属性对应的值更改为对应的主题名字
- 好像还要执行一下git pull(这个不太清楚)
- hexo g
- hexo s
- 如果满意:hexo d
此后的操作我还不太懂,不知道这些都要提交到github仓库吗?不然以后本地删除了怎么办?但是仓库的空间康德住吗?诸如此类的
补充:经过探查,这个已经替代了git操作,不需要git add/commit/push,hexo d将这些工作全部都做了,更加方便了此外,针对这个主题,没有显示about页面,感到很遗憾,自己倒是添加了,显示后不是我想要的那种单独效果,最后是添加到侧边栏上才比较好,可是网上找不到教程,很遗憾,目前只能搞一个单独页面,很low