A good first step is to take a look at the documentation for the Hexo installation

  • Hexo.io /zh-cn/, the best choice for a static blog, has a wide variety of themes.
  • To install Hexo, first download and install node.js, because hexo blog is based on Node.js, download and install nodejs.org/ directly from the documentation, then download and install Git. Then perform

NPM is the NodeJS package manager, used for node plug-in management (including installation, uninstallation, dependency management, etc.) 2. NPM install [-g] [-save-dev] : indicates the name of the node plug-in. For example: NPM install gulp-less –save-dev 3.-g: global installation. Will be installed in C: Users \ Administrator \ AppData \ Roaming \ NPM, and write system environment variables; Non-global installation: it will be installed in the current location directory. The global installation can be called from anywhere on the command line, and the local installation will be installed in the node_modules folder of the location directory, called by request (); 4. -save: save to package.json (package.json is the NodeJS project configuration file) 5. Package. json: save to devDependencies of package.json. Since the node plug-in package is relatively large, do not add package management, write configuration information to package.json and add it to version management, other developers can download it accordingly (command prompt NPM install will download all required packages according to package.json).

  1. Uninstall plugin using NPM: NPM uninstall [-g] [–save-dev]
  2. NPM update [-g] [–save-dev]
  3. NPM update [–save-dev]
  4. See NPM Help: NPM Help

10. Check the installed plug-ins in the current directory: NPM list

PS: NPM plug-in installation process: download the corresponding plug-in package from http://registry.npmjs.org (the website server located in foreign countries, so often download slow or abnormal), solution to look down left left left left left left down down down down down.

CNPM is introduced:

1. Note: Because the Google plug-in is downloaded from a foreign server, it is greatly affected by the network, and there may be abnormalities. It would be good if Google’s server is in China, so we are willing to share taobao team did this. “This is a full nPMjs.org image, which you can use instead of the official version (read only). The synchronization frequency is currently 10 minutes to ensure as much synchronization as possible with the official service.” 2. The official website: npm.taobao.org installation: command prompt execution of NPM install CNPM – g (3) 4 – registry=https://registry.npm.taobao.org. Note: after the installation, it is best to check the version of CNPM -v or close the command prompt to open it again.

npm install -g cnpm --registry=https://registry.npm.taobao.org
Copy the code





cnpm install -g hexo-cli
Copy the code



You can also download Hexo using NPM and install it

$ npm install -g hexo-cli
Copy the code





After downloading hexo, execute it directly under creating a new folder

$ hexo init <folder>
Copy the code

The structural directory of the blog is then generated



Start the blog application

$ hexo server
Copy the code
Hexo clean # used to clean cache files hexo g # Generated file hexo s # run local server hexo d # upload to serverCopy the code



Visit page:



Create your first blog:













Next you can deploy your blog to GitHub

Users deploying personal blogs to GitHub repositories must be named in accordance with the following requirements:

Nickname +. Making, IO



Install the Git deployment plug-in in the blog folder













Quick Start Create a new post 1 $hexo new “My new Post” More info: Writing

Run server

1

$ hexo server

More info: Server

Generate static files

1

$ hexo generate

More info: Generating

Deploy to remote sites

1

$ hexo deploy

More info: Deployment