Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

创建github个人博客 #10

Open
ScottWei007 opened this issue Jul 9, 2017 · 0 comments
Open

创建github个人博客 #10

ScottWei007 opened this issue Jul 9, 2017 · 0 comments

Comments

@ScottWei007
Copy link
Owner

ScottWei007 commented Jul 9, 2017

  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

  1. 启动,访问本地写可视化文章,hexo s 访问http://localhost:4000/admin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant