cactus主题的使用配置

cactus主题的使用配置

使用的问题

  • 缺少黑夜模式
  • 表格确实竖线 显示不明显
  • 格式显示混乱 个标题区分不明显
  • 显示区域过于狭窄
  • 一个主题多个学习文件分类显示太乱 可以像文件夹一样显示

创建标签页,分类页,搜索页

以标签页为例子

1
hexo new page tags

进入创建的tags文件夹中,将index.md中的title中添加type:tag

创建搜索页

1
hexo new page search

进入创建的tags文件夹中,将index.md中的title中添加type:search.同时安装本地搜索插件 hexo-generate-search

1
cnpm install hexo-generator-search --save

主题配置文件主要选项

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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
##############################################################################
# Content
##############################################################################

# Link to a page that gives an overview of all your projects.
# This can be an external link (e.g., to you GitHub profile) or to another
# page within your website.
#链接到gitee
projects_url: http://gitee.com

# Set the page direction to RTL or LTR. default is LTR. (if you set it 'rtl', the 'vazir' font will be loaded.)
#菜单栏在左(ltr),右(rtl)
direction: ltr
# Configure the navigation menu.
# A pair 'Key: url' will result in a link to 'url' with the name 'Key' in the
# navigation menu. Optionally, you can add translations for the 'Key' in
# languages/*.yml
#导航栏设置
nav:
home: /
articles: /archives/
category: /categories/
tag: /tags/
search: /search/
about: /about/
projects: http://gitee.com/


# Links to your social media accounts.
# The keys should correspond to Fontawesome icon names
# (see https://fontawesome.com/icons?d=gallery&s=brands);
# only 'mail' is an exception.
#社交媒体账号
social_links:
github: http://gitee
zhihu: https://zhuanlan.zhihu.com/
magnifying-glass: https://www.baidu.com/
mail: https://mail.qq.com/

# Customize the overview with displaying a tagcloud on the index page.
# Options: https://hexo.io/docs/helpers.html#tagcloud
# 在首页显示文章,生成tag云
tags_overview: true

# Customize the overview with the most recent blog posts on the index page.
# Options:
# - show_all_posts: whether to show all available posts.
# - post_count: whether to show only the x most recent posts.
# - sort_updated: sort posts by last modification date instead of creation date.
posts_overview:
show_all_posts: false
post_count: 5
sort_updated: true

# Customize the archive view.
# Options:
# - sort_updated: sort posts by last modification date instead of creation date.
# Note: this does not work together with pagination, since the pagination
# plugin will sort pages by date of creation.
#归档中的文章按照更新日期排序
archive:
sort_updated: true

# Customize the article view.
# Options:
# - show_updated: show the last modification date.
#显示修改日期
post:
show_updated: true

# Customize the copyright years
# Note: if start_year/end_year not provided, will use current year.
copyright:
start_year: 2018
end_year: 2023

# Customize the 404 page
# Options:
# - enabled: whether to enable the 404 page (404.html).
#定义404页
error_404:
enabled: true
title: "404 Page Not Found"
description: "The page you are looking for might have been removed, had its name changed, or is temporarily unavailable."


##############################################################################
# Look and Feel
##############################################################################

# Customize the logo (i.e., the cactus) in the header.
# Options:
# - enabled: whether to show (true) or hide (false) the logo.
# - width: width of the logo in pixel units
# - height: height of the logo in pixel units
# - url: where the logo can be found
# - gravatar: whether to use your Gravatar as the logo
# - grayout: whether to enable a hover effect on the logo
# 图标显示
logo:
enabled: true
width: 50
height: 50
url: /images/logo.png
gravatar: false
grayout: true

# Customize the favicons.
# Cactus supports a limited set of the three most important icons:
# - desktop: The classic favion.ico file.
# - android: A 192x192 PNG file.
# - apple: A 180x180 PNG file.
# These can be generated with http://realfavicongenerator.net/
# Options:
# - url: where the icon can be found
# - gravatar: whether to create a favicon from your Gravatar
favicon:
desktop:
url: /images/favicon.ico
gravatar: false
android:
url: /images/favicon-192x192.png
gravatar: false
apple:
url: /images/apple-touch-icon.png
gravatar: false

# The color scheme that should be used to highlight codeblocks.
# See source/css/_highlight for a list of all available color schemes.
#代码高亮,样式在主题文件夹中
highlight: idea

# Set the color scheme.
# Available color schemes are 'dark', 'light', 'classic' and 'white'.
# Alternatively, add your own custom color scheme to source/css/_colors.
# 页面显示颜色:黑色 灰色 米黄色 白色
colorscheme: classic
# Maximal width of the page in rem units.
page_width: 48

Hexo基本信息配置

站点名称语言

1
2
3
4
5
6
7
8
# Site
title: Hexo
subtitle: ''
description: ''
keywords:
author: mk310
language: zh-CN
timezone: ''

gitee部署

1
2
3
4
5
6
# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
type: git
branch: master
repo: https://gitee.com/SmashDog1/SmashDog1

配置邮箱和用户名

1
2
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

使用hexo d命令部署,然后会提示用户名和密码输入后上传成功