博客使用的主题,根据Yelee主题更改而来。
需要先按照 Hexo Doc 的说明安装好 Hexo,之后将此 repository clone 至 theme/yelee
文件夹中。
clone之后运行install.sh
文件自动更新其余Hexo配置文件及建立相关环境。注意:运行此文件前先自行查看此文件具体做了什么,以免误删文件。此文件主要作用是新建立一个Hexo环境后执行的初始化操作,会清空_post
文件夹,并自动clone我备份在Github上的原始markdown文件。
由于使用了多个配置文件,不要直接运行 hexo
命令,而应该用 npm run
。
以下是原主题ReadMe文档:
Theme Yelee relies on Hexo-Theme-Yilia, thanks for the author Litten. Fix some bugs, change lots of styles, add several features. And then I made the theme. Yelee is mainly designed for fluent text reading. I change styles and add functions, meanwhile, try hard to keep this theme simple, stupid and clear. Theme DEMO: MOxFIVE's Blog
### Installationgit clone https://github.com/MOxFIVE/hexo-theme-yelee.git themes/yelee
Change theme field in Hexo root's _config.yml file.
theme: yelee
cd themes/yelee
git pull
New Features DEMO
- | En |
---|---|
1 | Flexible table of contents |
2 | Transparent & Random background |
3 | Scrolling button |
4 | Copyright info. |
5 | Post navigation button |
6 | Site counter |
7 | i18n, multi-language |
8 | Local Site Search |
9 | Load Comment dynamically |
Use internationalization to present your site in different languages.
https://hexo.io/docs/internationalization.html
# Hexo Configuration
## Docs: http://hexo.io/docs/configuration.html
# Site
language: en
Code | - | - | Contributor(s) |
---|---|---|---|
en | English | 英语 | MOxFIVE |
zh-Hans | Chinese (Simplified) | 大陆简体 | MOxFIVE |
zh-Hant-HK | Chinese (Traditional) | 港澳繁體 | MOxFIVE |
zh-Hant-TW | Chinese (Traditional) | 台灣正體 | MOxFIVE |
Any Contribution is Welcome!
There are two ways to show excerpt in homepage.
- a:
title: Hello World
date: 2015-12-03 00:00:00
---
<Excerpt in index>
+ <!-- more -->
<The rest of contents文>
- b: description in Front-matter
title: Hello World
date: 2015-12-03 00:00:00
+ description: "Welcome to Hexo! This is your very first post."
---
<Contents>
Description only support plain text
Set the value of description with quotes to avoid unexpected error
:
cd to your hexo folder and run this code:
hexo new page about
hexo new page tags
Post with several categories issue#4
Find or change background images in folder:
/yelee/source/background/
Setting in themes/yelee/_config.yml
:
background_image: 5
-
Default value is 5, free to modify the number
-
"5": show 5 images form bg-1.jpg to bg-5.jpg in
/yelee/source/background/
-
"0": remove background image and use white-gray theme
Saving JPEGs for the Web: Setting Photoshop Up for Progressive JPEGs
Optimize images with PhotoShop (JPEG, Quality 0, Progressive)
Set inline_code to style highlight text & Chose a highlight theme for code block.
highlight_style:
#on: true
inline_code: 1
code_block: 1
Set on: true
to enable this feature
highlight theme from https://github.com/chriskempson/tomorrow-theme
Disqus, duoshuo and youyan is supported, enable ONE of them in theme's "_config.yml".
Remove toc and the button via putting toc: false
before "---" at [post].md.
Hide toc in default
Set
toc: false
inyelee/_config.yml
.
(Set toc: true
in front-matter to show it in certain post)
Hide this via putting original: false
to post's front-matter.
Hide Copyright info. in default
Set
copyright: false
inyelee/_config.yml
.
(Set original: true
in front-matter to show it in certain post)
hexo new page 404
And then set permalink: /404
in /source/404/index.md
front matter.
Install plugin: hexo-generator-feed
Install plugin: hexo-generator-seo-friendly-sitemap
Baidu: hexo-generator-baidu-sitemap
The Path is /yelee/source/apple-touch-icon.png