Static website Hexo
Hexo is a static website framework that helps authors quickly build professional-looking blogs
Hexo’s articles are written in markdown syntax
Reference: Try to learn Hexo
Environmental Construction
- Install nvm
NVM: Node.js Version Manager
- nvm install Node.js
1
nvm install latest 64
- nvm activate node.js
- Normal Activation: The following message is displayed to indicate normal activation:
1
nvm on
1
2nvm enabled
Now using node v17.8.0 (64-bit) - troubleshooting:
Use commandnvm on
ornvm use latest 64
, but show up:This is due to insufficient privileges, please open it with administrator privileges.1
exit status 1: �s���Q�ڡC
- Normal Activation:
- View the node.js version after nvm is activated
1
node --version
- nvm install Hexo
1
npm install -g hexo-cli
- View Hexo version
1
hexo -v
Start Hexo
- Buold Hexo website project
Generate hexo web directory in current directory
1 | hexo init <myblog: DirName> |
- Create the first article
1 | hexo new "first-artical" |
You can see the first-artical.md generated in the source/_post directory
Preview blogs: Hexo compilation, built-in Web Server, and other important commands
- Compile and generate web files
1
hexo generate
- Activate Hexo web server
1
hexo server
- Other abort and clear related commands
Clear cache files: Clear cache files (db.json) and compiled files (public)1
hexo clean