title: Github+hexo搭建个人博客
tags: created by luffy
一、hexo搭建本地博客
1.安装Node.js2.npm install -g cnpm --registry=https://registry.pm install -g hexo-cli4.新建一个文件夹,来存放博客内容5.进入文件夹,cmd命令:hexo init6.启动博客:hexo s7.新建文章:hexo n "blogName"(生成的是md文件)8.生成博客文章:hexo g
二、博客部署到Github
1.Github新建仓库2.仓库命名必须为:用户名.github.io3.安装hexo相关git插件:cnpm install --save hexo-deployer-git4.blog目录下设置_config.yml文件:Deployment下type: git repo: 仓库地址(后缀为.git的url)branch: master5.hexo d
三、自定义博客主题
GitHub:/litten/hexo-theme-yilia更换主题:1.git clone /litten/hexo-theme-yilia.git themes/yilia/luuman/hexo-theme-spfk.git themes/spfk2.修改_config,yml: theme: yilia3.重启hexo:hexo clean->hexo g-> hexo s4.推到远端:hexo d