Home > Web Front-end > JS Tutorial > How to use hexo to build your own blog

How to use hexo to build your own blog

一个新手
Release: 2017-09-07 14:05:44
Original
1379 people have browsed it


Use hexo to build your blog

Preparation conditions

  • node operating environment;

  • git environment (you need to go to github to pull the code, and you can also use this to push the code to github in the future)

Start working

1. Install hexo globally. If npm is too slow, you can set up Taobao mirror, or install cnpm directly

npm i -g hexo
Copy after login

2. Initialize hexo

hexo init  hexoName #hexoName为你想建立的hexo目录cd hexoName
npm install #安装各类包hexo g #自动生成静态文件hexo s #运行服务
Copy after login

Open http://localhost:4000/ without reporting an error You can access it. If you are prompted that the port is occupied, you can use

hexo s -p 1234 #1234为你指定的端口号
Copy after login

Of course this is the default hexo theme. Next we need to change the theme and upload it to the git free domain name

hexo commonly used commands

bash <br> hexo clear deletes the generated static files <br> hexo g generates static files, which are the pages you visit <br> hexo s starts hexo service <br> hexo d deployment <br> hexo init initialization <br> hexo new Create a new article or page <br>

Summary:

hexo is a relatively simple and easy-to-use blog framework, and there are many themes for everyone to choose from

The above is the detailed content of How to use hexo to build your own blog. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template