搭建指南

我是一个客户端开发工程师,老实说对前端开发一点也不熟,所以在搭建这个博客的时候参考了很多博客,具体就列出下面几个博客

安装全系列教程:http://wsgzao.github.io/post/hexo-guide/
主题提供者:https://github.com/MOxFIVE/hexo-theme-yelee/
建站全攻略:http://zipperary.com/categories/hexo/

博客学习日记

日记不是从最开始搭建博客开始记录的,所以前期的步骤是没有的

hexo d 功能使用

之前一直是提交public,但是这样非常麻烦,所以我这边配置了一下

git保存密码参考文档:http://www.cnblogs.com/dudu/archive/2011/07/06/git_save_username_password.html
这个站点要加https比如 githubhttps//github.com

然后在_config.yml里面添加一段代码

1
2
3
4
5
deploy:
type: git
message: "更新博客^.^"
repo:
- https://github.com/pyystone/pyystone.github.io.git,master

创建三级目录

—以上的部分categories: 这里
比如我的 code/android 就是

1
2
3
categories: 
- code
- android

增加百度,谷歌网站索引

参考地址 http://zipperary.com/2013/06/02/hexo-guide-5/

百度: http://zhanzhang.baidu.com/
谷歌: https://www.google.com/webmasters/tools/home?hl=zh-CN

通过 sitemap方式,可以安装sitemap插件
sitemap的路径是 域名/sitemap.xml
注意验证的html如果直接放到source里面会被转码添加一些内容,所以我们要在开头手动添加

1
2
layout: false
---

安装sitemap插件

git 运行 npm install hexo-generator-feed

然后编辑 hexo/_config.yml

1
2
plugins:
- hexo-generator-feed
文章目录
  1. 1. 博客学习日记
    1. 1.1. hexo d 功能使用
    2. 1.2. 创建三级目录
    3. 1.3. 增加百度,谷歌网站索引
      1. 1.3.1. 安装sitemap插件