Make a website with Hexo

What is Hexo?
Hexo is a fast, simple and powerful blog framework. You write posts in Markdown (or other languages) and Hexo generates static files with a beautiful theme in seconds.
Why I Choose Hexo?
I used to make websites by web framework(eg. Laravel,Thinkphp,Wordpress),but we can’t use any databases on Gitlab. So I had to find a way to make a static website without databases.
After trying HTML(write HTML without any framework),Jekyll and Hexo,I decided to use Hexo.Because I need a blog framwork system to write a simple and beautiful article for the long term.


Overview

1
2
3
4
5
$ npm install hexo-cli -g
$ hexo init blog
$ cd blog
$ npm install
$ hexo server

Install Hexo on your PC

Open your terminal,run the below code.

1
$ npm install hexo-cli -g

Error1:Permission

Bad luck in the beginning~

It’s said “Please try running this command again as root/Administrator”
So I add “sudo” at the command,

1
$ sudo npm install hexo-cli -g

There is Warning,but it’s succeed to install.

Create a Hexo project

1
$ hexo init blog

Open the Hexo project

1
$ cd blog

Install packages for Hexo project

1
$ npm install

Run the Hexo project

1
$ hexo server

Error2

Another Error!

So I searched the error on github,someone said click here

So I try to reinstall the hexo

1
2
$ npm uninstall hexo
$ npm install hexo –no-optional –save

It works!

That’s my way to make a website with hexo

1
2
3
4
5
$ npm install hexo-cli -g
$ hexo init blog
$ cd blog
$ npm install hexo --no-optional
$ hexo server


This work is licensed under a Creative Commons Attribution 4.0 International License.