值得观看技术笔记互联网科技

Hexo搭建个人博客部署于Github与Coding

2016-08-26  本文已影响1497人  HalShaw
Git命令
    $ npm install hexo-cli -g
    $ hexo init blog
    $ cd blog
$ hexo g/generate #生成静态文件
$ hexo s/server #启动服务器,主要用来本地预览
$ hexo d/deploy #将本地文件发布到github或Coding上
$ hexo n/new "postName"#新建一篇文章
$ hexo n/new page "pageName" #新建页面
$ hexo h/help # 查看帮助
$ hexo v/version #查看Hexo的版本
hexo g
hexo d
 ERROR Deployer not found : github
npm install hexo-deployer-git --save
deploy:
  type: git
  repo: 
    coding: git@git.coding.net:HalShaw/halshaw.git,master
    github: https://github.com/HalShaw/halshaw.github.io.git,master
deploy:  
  type: git
  repository: https://github.com/HalShaw/halshaw.github.io.git 
  branch: master
Invalid argument
npm install

创建page失败,madan,招谁惹谁了我,怎么遇到这么多问题呢。又是一番搜索之后找到了一个我认为满意的答案

- Make a backup of the content locally
- Delete the repository from GitHub
- Delete the repository locally
- Recreate the repository, ensuring that you don't include the repository within the repository locally, which is what you did previously
- Push it to GitHub
$ hexo n my first
INFO  Created: D:\hexo1\hexo\source\_posts\first.md
title: my first#标题和日期必须唯一,因为访问文章的url是根据二者生成的
date: 2016-08-25 15:33:58
tags: 'try' #标签
categories: "技术" #分类
hexo clean
hexo g
hexo s
hexo d

本文为作者原创,保留所有权,欢迎转载,转载请注明出处,标明作者。

上一篇下一篇

猜你喜欢

热点阅读