Long time ago, I intented to create my own static blog on github. I tried jekyll and octopress at beginning of this year. Hoever it just not the feel of blog. It kind of short simplicity. I am not against to use ruby. As a Front end developer now, I used ruby quite alot for sass and compass. I also used leanote and wiznote for personal blog building. Still I feels there is something not correct.
Unti I find vimWiki, I realized the language for bloging is not convenient for me. As a programmer, I prefer to note down my thoughts as fast as possible. Markdown with TOC seems is perfect for me. Then I recorded jekyll also support markdown. After the second time of investigation in jekyll, I found out jekyll is not convenient for markdown indexing and generating TOC. I know They can be archieve by installing generators. In the time of search around, hexo falls into my eyes. It’s combination of all functions I am looking for, And it’s build on Nodejs, this is a plus point for me. =)
tl:dr
Install Hexo
How to install
follow the user guild, the installation of Hexo is very standard NodeJs installation. make sure your have NodeJs installed first.
Init your project
create a new folder and inside the folder, init the hexo project.
See your blog
start your hexo server, you can see your hexo is runing on localhost:4000
|
|
Your first post
|
|
Now your blog is up to running. How simple it is. ~o~
Setup Theme
Now is time to beautify your blog. I will not list down the common markdown syntex You can browser through the hexo themes. I need a theme has better navigation, tags system and also support internal search. I found this theme indigo suits all my needs.
Clone your theme
Copy the theme into your themes
Shift to new theme
You only need to modify the ‘_config.yml’ to enable the new theme
Install all necessary plugs
To enable the theme default functions, style, feed rss, json content and side
navigator, you need to install following plugins.
Enable tags
Create a page tag and modify it to enable the them tags.
Modify the create tags page, replace the content as below.
Now you have your first nice theme. Because this theme is created by a chinese
author, you might need to change system chinese instructions. It wont take you
too much time compare to create your own theme. You can also find your own
prefered theme on hexo website. The installation takes the same steps.
Deploy to github
The Deployment in hexo is so simple to do. You only need to specify the deploy in
your _config.yml, then you are ready to go. I prefer to host my blog on my
Setup deployment
github account.
Deploy
|
|
You will be asked to key in username and password if you choose to use http repo url.
Msc
There are few functions I added to my blog. Some of them took me few time to
figure it out how they works. List them down here, hope can save your time.
Enable Disqus Comment prompt
the disqus short name is not your username or display name. It’s the name in
your url right before the ‘disqus.com’, this one really confused me for a
awhile.
Hope this post can help you. I will update this on the way of using it. Leave
your comments if you need any assistant.
本文地址: https://bookcaseballpen.github.io/2016/09/17/My-first-post/