请遵守AGPL 3.0协议 本主题已开源于hexo-theme-wang

教程

Date Icon
Update Icon

详细的主题配置

默认配置

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
## 主题配置文件,图片路径都是在主题文件夹下的source文件夹下
### 额外的<head>标签内插入内容,你可能会需要插入一些第三方的js库,例如统计代码等
head:
'<script>
console.log("Hello hexo-theme-wang");
</script>'

## 头像配置
avatar:
src: images/avatar.webp #头像路径
isround: true #是否是圆形

## 导航栏菜单 用 || 隔开,前面是菜单名称,后面是图标名称,位置在source/images/menu_ico
menu:
Home: / ||home
Archives: /archives ||archives
Categories: /categories || categories
Tags: /tags || tags
About: /about || about
Links: /links || links
RSS: /atom.xml || rss ##需要安装 hexo-generator-feed
Travelling: https://www.travellings.cn/go.html || train

## 展示社交媒体链接 前面是名称,后面是图标名称 位置在source/images/social_links
social_links:
Github: https://github.com/xingwangzhe || github
Email: mailto:xingwangzhe@outloock.com || envelope


# 需要安装hexo-generator-searchdb
search:
enable: false # 是否启用搜索功能
path: /search.xml # 添加前导斜杠,表示从网站根目录开始

## 时间是否显示秒
time:
show_seconds: true


## Waline评论,需要设置serverURL,详情请访问Waline官网:https://waline.js.org
comments:
enable: false # 是否启用评论功能
serverURL: ''

## 友链,需要设置name,link,img,description
friend_links:
- name: 姓王者
link: https://xingwangzhe.fun/
img: https://i.ibb.co/vLC0cft/202406212107148.jpg
description: 记录学习生活的琐事,或技术文章
- name:
link:
img:
description:

## 底部链接,需要设置name,link,img
footer_links:
- name: 开往-友链接力
link: https://www.travellings.cn/go.html
img: https://www.travellings.cn/assets/logo.gif
- name: 阿里云支持
link: https://www.aliyun.com/minisite/goods?userCode=lmvvqvl9
img: https://i.ibb.co/h7XJkfm/LOGO.png
- name: 大佬论坛
link: https://www.dalao.net/
img: https://www.dalao.net/img/dalao-svg.svg
- name: BlogFinder
link: https://bf.zzxworld.com/
img: https://bf.zzxworld.com/images/logo-v2.png
- name: 2024-10-29-133009
link: https://storeweb.cn/
img: https://i.ibb.co/tc0z0Y5/2024-10-29-133009.png
- name: 空间穿梭-随机访问BlogsClub成员博客
link: https://www.blogsclub.org/go
img: https://www.blogsclub.org/images/shuttle_4.png

## 底部文字链接,需要设置name,link
footer_links_text:
- name: 文字链接
link:
Date Icon
Update Icon

安装并简单配置主题

安装主题

有两种安装方法

直接git clone


不推荐这种做法,除非你确实想魔改主题,否则,为了稳定性和方便更新,建议使用npm安装

1
git clone https://github.com/xingwangzhe/hexo-theme-wang.git

到themes目录下

然后在你的根目录下的_config.yml的配置的主题配置改为

1
theme: hexo-theme-wang

npm安装

👍

推荐这个安装方法!

Date Icon
Update Icon

在使用主题之前,先学会配置hexo

什么是hexo

Hexo是一个流行已久的静态博客框架,生态丰富,主题插件都很多,现在依然在更新!

安装hexo

下载nodejs

什么?你不知道nodejs吗,它可是js的引擎,如果没有它,js是无法在浏览器以外的环境下运行的,所以请下载Node.js — 在任何地方运行 JavaScript

按照安装程序一步一步地来,当然,建议安装在非C盘区域

检查是否安装好nodejs?