This Y Blog theme created by YaoFeiliang modified from the original Porter Hux.
Live Demo
Yao Feiliang Blog : www.yaofeiliang.com
Install Hexo
Install Node.js and Git
1 | For Mac |
Install hexo
1 | npm install hexo-cli -g |
Theme Usage
Init
1 | git clone https://github.com/yaofeiliang/hexo-YBlog.git ./yaofeiliang |
Modify
Modify _config.yml
file with your own info.
Especially the section:
Deployment
Replace to your own repo!1
2
3
4deploy:
type: git
repo: https://github.com/<yourAccount>/<repo>
branch: <your-branch>
Sidebar settings
Copy your avatar image to <root>/img/
and modify the _config.yml
:1
2
3sidebar: true # whether or not using Sidebar.
sidebar-about-description: "<your description>"
sidebar-avatar: img/<your avatar path>
and activate your personal widget you like1
2
3
4
5
6
7widgets: # here are widget you can use, you can comment out
- featured-tags
- short-about
- recent-posts
- friends-blog
- archive
- category
if you want to add sidebar widget, please add at layout/_widget
.
Signature Setup
Copy your signature image to <root>/img/signature
and modify the _config.yml
:1
2signature: true # show signature
signature-img: img/signature/<your-signature-ID>
Go to top icon Setup
My icon is using iron man, you can change to your own icon at css/image
.
Post tag
You can decide to show post tags or not.1
home_posts_tag: true
Markdown render
My markdown render engine plugin is hexo-renderer-markdown-it.1
2
3
4
5
6
7
8
9
10# Markdown-it config
## Docs: https://github.com/celsomiranda/hexo-renderer-markdown-it/wiki
markdown:
render:
html: true
xhtmlOut: false
breaks: true
linkify: true
typographer: true
quotes: '“”‘’'
and if you want to change the header anchor ‘ℬ’, you can go to layout/post.ejs
to change it.1
2
3
4
5
6async("https://cdn.bootcss.com/anchor-js/1.1.1/anchor.min.js",function(){
anchors.options = {
visible: 'hover',
placement: 'left',
icon: ℬ // this is the header anchor "unicode" icon
};
Hexo Basics
Some hexo command:1
2
3
4hexo new post "<post name>" # you can change post to another layout if you want
hexo clean && hexo generate # generate the static file
hexo server # run hexo in local environment
hexo deploy # hexo will push the static files automatically into the specific branch(gh-pages) of your repo!
Have fun ^_^
Please Star this Project if you like it! Follow would also be appreciated!
Peace!