搭建个人博客

搭建个人博客

  • 安装node.js

  • 拥有node.js、npm(cnpm)

  • 安装hexo(博客框架,需要在node环境下)

    • cnpm install -g hexo
  • 初始化博客

    • hexo init 文件夹名称
    • 在空的文件夹下
  • 运行博客

    • hexo s/hexo server
  • 建立新讯息

    • hexo new '我的新帖子'/ hexo n '我的新帖子'
  • 生成静态文件

    • hexo generate/hexo g
  • 部署github仓库

    • 用户部署个人博客的github仓库的命名必须符合特定要求才行
      • 用户名 + .github.io
  • 安装git部署插件

    • cnpm install --save hexo-deployer-git
  • 更改_config.yml文件

    • deploy: 
         type: git
         repo: https://github.com/Landuo629/Landuo629.github.io.git
         branch: master
      
  • 一键部署

    • hexo deploy/hexo d
  • 更换主题

    • 克隆主题git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia
    • 更改_config.yml文件
      • theme: yilia
  • 参数

posted @ 2020-04-13 15:59  懒惰ing  阅读(228)  评论(0编辑  收藏  举报