Make a website with Hexo

hexotop.png

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
$ 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~
error1.png
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.
success1.png

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!
error2.png
So I searched the error on github,someone said click here
way2.png
So I try to reinstall the hexo

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

It works!

That’s my way to make a website with hexo

1
$ 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.

文章目录
  1. 1. Install Hexo on your PC
    1. 1.1. Error1:Permission
  2. 2. Create a Hexo project
  3. 3. Open the Hexo project
  4. 4. Install packages for Hexo project
  5. 5. Run the Hexo project
    1. 5.1. Error2
  6. 6. That’s my way to make a website with hexo
,