After installing Hexo, execute the following command and Hexo will create the required files in the specified folder. Note that the recommended name for this folder is the blog name:

hexo init <folder>
cd <folder>
npm install
Copy the code



The folder Hexo initializes is the main blog file:

. ├ ─ ─ _config. Yml ├ ─ ─ package. The json ├ ─ ─ scaffolds ├ ─ ─ source | ├ ─ ─ _drafts | └ ─ ─ _posts └ ─ ─ themesCopy the code
  • _config.yml: main configuration information of the website;
  • Package. json: information about the application;
  • Scaffolds: The templates folder, where Hexo automatically adds content to new articles based on the templates;
  • Source: resource folder;
  • Themes d.

Open Hexo’s service with the following command:

hexo g
hexo server
Copy the code





Hexo service started successfully, pressCtrl+CTo stop the service, type in your browserhttp://localhost:4000You can see the default Hexo page: