Step by step
Create a repository for blog
Repository name: foxfromworld.github.io
Create a repository for storing the content of the blog
Repository name: repo_hexo
Clone the git repository
1 | $ git clone https://github.com/foxfromworld/repo_hexo.git |
Install nmp (Node Package Manager)
1 | sudo apt install npm |
Install Hexo
1 | npm install hexo -g |
If you encounter the error below…
1 | npm ERR! node v8.10.0 |
Please follow below steps to fix the issue.
1 | sudo apt-get remove nodejs |
Initialize the blog
1 | hexo init folder |
If you encounter the error below…
1 | FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html |
Initialize the blog in another empty folder.
1 | hexo init my-blog |
Create a new post.
1 | hexo new post "My first page by Hexo" |
Try to test and run server locally at http://localhost:4000/
1 | hexo server |
Deploy the blog
edit _config.yml
Enter the info in the Deployment section.
1 | deploy: |
1 | npm install hexo-deployer-git --save |
If you encounter the error below, please follow below steps to set up the ssh connection.
1 | FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html |
1 | git config --global user.name <your user name> |
If you see the following messages, that means your connection is setup correctly.
1 | PTY allocation request failed on channel 0 |
After one or two minutes, the blog will be available.
Check https://github.com/foxfromworld/foxfromworld.github.io/settings/pages.
It takes longer time for the first time. You should be able to see “Your site is live at https://foxfromworld.github.io/“, when the blog is available.