Home>Article>Web Front-end> How to use hexo to build your own blog
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)
1. Install hexo globally. If npm is too slow, you can set up Taobao mirror, or install cnpm directly
npm i -g hexo
2. Initialize hexo
hexo init hexoName #hexoName为你想建立的hexo目录cd hexoName npm install #安装各类包hexo g #自动生成静态文件hexo s #运行服务
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为你指定的端口号
Of course this is the default hexo theme. Next we need to change the theme and upload it to the git free domain name
bash
hexo clear deletes the generated static files
hexo g generates static files, which are the pages you visit
hexo s starts hexo service
hexo d deployment
hexo init initialization
hexo new Create a new article or page
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!