Skip to content

Han-Ya-Jun/hexo-theme-hanyajun

Repository files navigation

This HanYajun theme created by HanYajun modified from the original Porter HuWeihuang

Live Demo

HanYajun Blog : www.hanyajun.com

Theme HanYajun

Install Hexo

Install Node.js and Git

#For Mac
brew install node
brew install git

Install hexo

npm install hexo-cli -g

#For more:https://hexo.io/zh-cn/index.html

Theme Usage

Init


git clone [email protected]:Han-Ya-Jun/hexo-theme-hanyajun.git ./hexo-hanyajun
cd hexo-huweihuang
npm install

Modify


Modify _config.yml file with your own info. Especially the section:

Deployment

Replace to your own repo!

deploy:
  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:

sidebar: true    # whether or not using Sidebar.
sidebar-about-description: "<your description>"
sidebar-avatar: img/<your avatar path>

and activate your personal widget you like

widgets:         # 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:

signature: 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.

home_posts_tag: true

home_posts_tag-true

Markdown render

My markdown render engine plugin is hexo-renderer-markdown-it.

# 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.

async("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:

hexo 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 ^_^


<script async defer src="https://buttons.github.io/buttons.js"></script>

Please Star this Project if you like it! Follow would also be appreciated! Peace!

相比原来的版本新增的内容:

  • SNS 新增csdn,jianshu等设置,自己修改的话可以直接去修改hexo-theme-hanyajun\themes\huweihuang\layout_partial(底部图标)hexo-theme-hanyajun\themes\huweihuang\layout_widget(shout_about图标) image

  • 新增每日诗词(https://www.jinrishici.com/doc/#json-fast-easy) 相关文件:hexo-theme-hanyajun\themes\huweihuang\layout_partial image

  • 如果想插入音乐下载参考这个 https://github.com/MoePlayer/hexo-tag-aplayer

  • 原来很多的图片我采用七牛云的cdn了,相比要快很多

About

Ported theme of Hux Blog by Hu Weihuang, Modified by Han-Ya-Jun

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published