hexo搭建个人博客


  • 安装Node.js
  • 安装git

建立连接:
ssh -T git@git.dev.tencent.com

使用npm安装hexo,查看npm版本:

npm -v

安装Hexo:

  1. 创建博客文件夹 yuanzhiying.coding.me
  2. 安装hexo-cli:
sudo npm install -g hexo-cli
  1. 切换到yuanzhiying.coding.me目录
cd yuanzhiying.coding.me
  1. 初始化hexo
hexo init
  1. 安装依赖包
npm install
  1. 生成静态网页
hexo g
  1. 启动本地服务,ctrl+c停止服务
hexo s

查看效果:http://localhost:4000

  1. 托管平台创建项目名称为yuanzhiying.coding.me
  2. 配置hexo,_config.yml:
deploy:
  type: git
  repository: git@git.dev.tencent.com:yuanzhiying/yuanzhiying.coding.me.git
  branch: master
  1. 执行命令:
    sudo npm install hexo-deployer-git --save
  2. 清除缓存,重新生成
hexo clean && hexo g
  1. 部署
hexo d

也可以使用生成并发布:

hexo d -g
  1. 开启项目的pages功能

  • 更换主题

其他使用方法:
https://www.jianshu.com/p/21c94eb7bcd1
next主题定制使用:
http://theme-next.iissnan.com/getting-started.html

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容