官网:https://nodejs.org/en/,直接安装即可!

安装完成后查看下版本:

npm是node.js上的包管理器,需要用到npm下载hexo,但速度太慢了。 先使用npm安装国内的淘宝镜像源cnpm,步骤如下
npm install -g cnpm --registry="https://registry.npm.taobao.org"下载完成后,查看:

cnpm install -g hexo-cli如果是npm安装:
npm install -g hexo-cli查看是否安装成功:

hexo init启动:
hexo server	//或 hexo s
hexo new "内容标题"//或 hexo n "内容标题"
然后在source_posts下就会生成一个Markdown格式的文章,接着用编辑器打开后编写文章即可。
hexo cleanhexo server在GitHub上创建仓库,仓库名格式必须是:用户名.github.io 如:



cnpm install --save hexo-deployer-git
deploy:
  type: git
  repo: https://github.com/xdr630/xdr630.github.io.git	//仓库地址
  branch: master部署在github上的命令:
hexo deploy //或 hexo d
然后直接访问:xdr630.github.io 就行了
如: https://github.com/litten/hexo-theme-yilia https://github.com/xdr630/hexo-theme-icarus 我的本地已经clone过两个主题:

git clone /blog/themes/yilia文件夹下
git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia打开配置文件 _config.yml 修改 theme
theme: yilia之后再清除下缓存:
hexo clean重新生成:
hexo generate 	//或 hexo g访问:

部署到github上:
hexo deploy //或 hexo d访问:xdr630.github.io

也可以自己改主题的一些css样式之类。 这里我访问xdr630.github.io跳到yunxdr.top时,这是因为我在GitHub Pages设置了自定义域名,有关设置方法的详情请访问我写的这篇文章:https://blog.csdn.net/qq_41684621/article/details/103230888