hexo主题

hexo开始使用

更改主题

通过地址github下载,安装

git clone https://github.com/MOxFIVE/hexo-theme-yelee.git themes/yelee

修改config.yml中的主题

theme:Yelee;

主题更新

cd themes/yelee
git pull

语言切换(theme/yelee/_config.yml)

language: zh-Hans

hexo基础设置

个人图像

默认配置

默认头像存储于 yelee/source/img/icon.png

默认路径

avatar: /img/icon.png

主菜单(theme/yelee/_config.yml)

menu:
主页: /
所有文章: /archives/
标签云: /tags/
关于我: /about/

文章摘要

方法一:

1
2
3
4
5
6
7
title: Hello World
date: 2015-12-03 00:00:00
---
<Excerpt in index | 首页摘要>
+<!-- more -->
<The rest of contents | 余下全文>
<!-- more --> 之前最好不要有空格等字符;

方法二: description

1
2
3
4
5
title: Hello World
date: 2015-12-03 00:00:00
+description: "Welcome to Hexo! This is your very first post."
---
<Contents>

评论设置

主题目前支持 Disqus

动态加载评论

preload_comment: true

1
2
## true: 评论区跟随页面一起加载
## false: 当点击评论条等区域时再加载评论模块

评论数显示

选择是否在主页文章标题旁显示评论数(支持 多说 和 Disqus)

show_count: false

Disqus

Disqus

注册 Disqus,获取 shortname,然后填入下方对应区域

https://help.disqus.com/customer/en/portal/articles/466208-what-s-a-shortname-

网站成立年份(theme/yelee/_config.yml)

since: 2019

本地站内搜索

插件主页: hexo-generator-search
search:
on: true
onload: false

1
2
3
4
on启用状态
onload: true : 索引数据 search.xml 随页面一起加载 [效率优先]

onload: false : 当激活搜索框时再下载索引数据 [按需加载]

站点图标

在线制作图标:http://www.bitbug.net/
若将图标存储于 yelee/source/favicon.png

子目录站点

网站若存放在子目录,如 http://yoursite.com/blog

站点配置 (非子目录站点请填 /)

相关链接: https://hexo.io/docs/configuration.html#URL
root: /blog/

主题配置 (非子目录站点请 留空)

root_url: /blog/

文章目录
  1. 1. hexo开始使用
    1. 1.1. 更改主题
      1. 1.1.1. 通过地址github下载,安装
      2. 1.1.2. 修改config.yml中的主题
      3. 1.1.3. 主题更新
    2. 1.2. 语言切换(theme/yelee/_config.yml)
  2. 2. hexo基础设置
    1. 2.1. 个人图像
      1. 2.1.1. 默认配置
      2. 2.1.2. 默认路径
    2. 2.2. 主菜单(theme/yelee/_config.yml)
    3. 2.3. 文章摘要
      1. 2.3.1. 方法一:
      2. 2.3.2. 方法二: description
    4. 2.4. 评论设置
    5. 2.5. Disqus
    6. 2.6. 网站成立年份(theme/yelee/_config.yml)
    7. 2.7. 本地站内搜索
    8. 2.8. 站点图标
    9. 2.9. 子目录站点
      1. 2.9.1. 站点配置 (非子目录站点请填 /)
      2. 2.9.2. 主题配置 (非子目录站点请 留空)