地址:https://github.com/javascript
根据:用静态页面生成静态博客css
根据:About Simplehtml
先fork,push到你fork以后的你的simple项目下,而后把src文件夹push到gh-pages分支java
The template files are at /src/template, so you can modify the template files and css files. If you want use your own theme you can clone the project, modify the template files and push the entire src folder in your gh-pages branch which will allow you generate your own static blog.
You can use your own blog name, just modify the main.json file, and change name="username".
You can use disqus comment system, just modify the main.json file, and change disqus_shortname="" to disqus_shortname="your_shortname".
实测要改为disqus_shortname="Login"才能加载git
登陆disqus: https://disqus.com/
在设置中的Website中填入博客地址github
可知,在页面中加入如下代码便可:json
<!-- 多说评论框 start --> <div class="ds-thread" data-thread-key="ID" data-title="请替换成文章的标题" data-url="请替换成文章的网址"></div> <!-- 多说评论框 end --> <!-- 多说公共JS代码 start (一个网页只需插入一次) --> <script type="text/javascript"> var duoshuoQuery = {short_name:"yhcao"}; (function() { var ds = document.createElement('script'); ds.type = 'text/javascript';ds.async = true; ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js'; ds.charset = 'UTF-8'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ds); })(); </script> <!-- 多说公共JS代码 end -->
<div class="entry" id="main">
后添加:swift
<div class="duoshuo-div" id="duoshuo-div"> <!-- 多说评论框 start <div class="ds-thread" Id="data-duoshuo" data-thread-key="ID" data-title="标题" data-url="http://caojingyou.github.io"></div> --> <!-- 多说评论框 end --> <!-- 多说公共JS代码 start (一个网页只需插入一次) --> <script type="text/javascript"> var duoshuoQuery = {short_name:"yhcao"}; (function() { var ds = document.createElement('script'); ds.type = 'text/javascript';ds.async = true; ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js'; ds.charset = 'UTF-8'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ds); })(); </script> <!-- 多说公共JS代码 end --> </div> <script id="pagesTemplate" type="text/mustache">
后添加:hexo
<script id="duoshuo-sc" type="text/mustache"> <div class="ds-thread" Id="data-duoshuo" data-thread-key="{{key}}" data-title="{{title}}" data-url="博客网址{{url}}"></div> </script> $("#main").prepend(contentHtml);
后添加:app
var duoshuoTemplate = Hogan.compile($("#duoshuo-sc").html()); var duoshuoHtml = duoshuoTemplate.render({"key": path, "title": post.title, "url": path}); $("#duoshuo-div").prepend(duoshuoHtml);
进入百度站长平台
按照百度站内搜索所讲进行操做便可
在github中百度站内搜索不识别,全部添加了swiftype而放弃百度。
网站地址:https://swiftype.com/
建立GitHub技术博客全攻略
用静态页面生成静态博客
About Simple
Github空间在线写文章和用Farbox,Droppages在Dropbox建博客网站
百度站内搜索
使用swiftype实现站内搜索
Sitemap.xml Support