hexo 制作我的博客

简介: hexo 制作我的博客

YBlog

This Y Blog theme created by YaoFeiliang modified from the original Porter Hux.

Live Demo

Yao Feiliang Blog : www.yaofeiliang.com

Theme YaoFeiliang

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 https://github.com/yaofeiliang/hexo-YBlog.git ./yaofeiliang
cd yaofeiliang
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 ^_^


目录
相关文章
|
10月前
|
搜索推荐
hexo博客4:发布文章
hexo博客4:发布文章
56 0
|
Web App开发 域名解析 JavaScript
3分钟搭建个人Hexo博客
从账号的创建到一键部署,手把手教你零基础创建个人博客,后续可以继续根据网上的教程来修改代码对博客进行定制化的美化。
|
域名解析 JavaScript Linux
关于Hexo博客
关于Hexo博客
122 0
YI
|
Shell
Hexo博客搭建3
之前的文章介绍了博客的本地搭建和线上部署。因为hexo的内置主题不够好看,所以我们可以选择加载其他主题来美化我们的博客页面。本文我将介绍基于hexo框架搭建的博客如何修改主题。
YI
70 0
YI
|
Shell 开发工具 数据安全/隐私保护
Hexo博客搭建2
上一篇介绍了博客的本地环境搭建,但这只能本地访问自己的博客。如果想让自己的博客被互联网上的其他人访问,我们还需要将博客项目进行线上部署。本文我将介绍将博客部署到github上的方法。
YI
63 0
YI
|
JavaScript Shell Linux
Hexo博客搭建1
暑假在家学习时,突然感觉学过的知识忘记的很快,所以决定搭建个人博客来记录学习过程。经过前期了解后,决定采用Hexo框架来搭建个人博客。本文将记录博客搭建过程。
YI
92 0
|
JavaScript 搜索推荐 程序员
使用Hexo 搭建你的技术博客
使用Hexo 搭建你的技术博客
217 0
|
JavaScript Shell Linux
使用Hexo搭建自己的博客
之前一直在用typecho来做自己的博客,因为他操作比较简单,但是前几日修改一些配置的时候,看着满屏的php代码实在有些头疼,在朋友的推荐下,我成功的入坑了hexo,下面分享一些自己搭建博客的过程,尽量让读者避开一些坑。
|
Linux 前端开发
|
JavaScript
【开源博客】三个步骤学会Hexo快速生成精美博客!
最近学委跟小伙伴搞了一个py4ever 开源站点,使用的就是hexo。 下面是站点信息:py4ever开源站
216 0
【开源博客】三个步骤学会Hexo快速生成精美博客!