Coder Social home page Coder Social logo

mysprout.github.io's Introduction

#使用与配置Hexo ##2016.04.16 ###域名跳转 为了有助于SEO,我将我的一级域名指向www二级域名,由于Hexo搭建的博客是静态博客,只能在index.html通过JS控制,进行跳转: 进入:

D:\My Blog<博客本地根目录>\themes\raytaylorism\layout_partial

修改head.ejs:

//在head标签下添加
<script language=javascript>
    if (document.domain =='yangmeng.me')  
	    this.location = "http://www.yangmeng.me" + this.location.pathname + this.location.search;
</script>

##2016.04.15 ###添加RSS和sitemap ####通过npm安装插件

npm install [email protected] --save
npm install [email protected] --save

####修改全局配置文件_config.yml

#添加如下配置
feed:
  type: atom ##feed类型 atom或者rss2
  path: atom.xml ##feed路径
  limit: 20  ##feed文章最小数量

##2016.04.14 ###将我的博客同时托管到github和coding 将博客同时托管在国外和国内,通过DNSPOD分流,在国内访问coding,国外访问github,在执行时,出现了些问题,记录下来。

  • 我是现将hexo托管到github的,那么在coding托管的时候,项目名就必须和github的用户名相同,不然部署到git后,github上显示正常,coding上就不会显示样式
  • 执行hexo d上传到git时,因为我同时上传到两个平台,在修改_config.yml的deploy时,我使用回车换行,写不同的平台,执行hexo d命令时,会报格式不正确。
#这里是正确的格式
deploy:
  type: git
  message: ""
  repo: 
    github: https://github.com/mysprout/mysprout.github.io.git,master
    coding: https://git.coding.net/mysprout/mysprout.git,coding-pages

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.