ScottWei007 / hello-world

new comer
0 stars 0 forks source link

创建github个人博客 #10

Open ScottWei007 opened 7 years ago

ScottWei007 commented 7 years ago
  1. 创建github pages: 创建一个仓库,lilwei.github.io

  2. 安装Hexo: 前提安装git,安装node.js, 使用Git Bash命令行 : npm install -g hexo-cli

  3. 建站: hexo init hexo(自定义文件名) cd hexo npm install

  4. 关联hexo和github pages,编辑_config.yml文件(注意格式): deploy: type: git repo: https://github.com/lilwei/lilwei.github.io.git branch: master

  5. 本地测试: hexo s

  6. 访问:localhost:4000

  7. 发布到github(清除,生成,发布): hexo clean hexo g npm install hexo-deployer-git --save hexo d

  8. 远程访问:https://lilwei.github.io/

  9. 写文章时,可视化,安装hey插件: npm install hexo-hey --save

  10. 修改_config.yml配置文件(注意格式):

    Admin

    admin: name: hexo password: hey secret: hey hexo expire: 60*1

    cors: http://localhost:3000

  11. 启动,访问本地写可视化文章,hexo s 访问http://localhost:4000/admin