搭建个人博客

注册GitHub账号

地址:https://github.com/

创建博客

根据:用静态页面生成静态博客

个性化博客

做自己的simple:

根据:About Simple

先fork,push到你fork之后的你的simple项目下,然后把src文件夹push到gh-pages分支

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".  

设置disqus:

You can use disqus comment system, just modify the main.json file, and change disqus_shortname="" to disqus_shortname="your_shortname". 

实测要改成disqus_shortname="Login"才能加载

登录disqus: https://disqus.com/
在设置中的Website中填入博客地址

添加多说评论系统:

登录多说评论系统:http://duoshuo.com/

可知,在页面中加入以下代码即可:

<!-- 多说评论框 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 -->

修改自己simple项目的模版post.html

<div class="entry" id="main">

后添加:

<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">

后添加:

<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);

后添加:

var duoshuoTemplate = Hogan.compile($("#duoshuo-sc").html());
var duoshuoHtml = duoshuoTemplate.render({"key": path, "title": post.title, "url": path});
$("#duoshuo-div").prepend(duoshuoHtml);

添加百度站内搜索:

进入百度站长平台
按照百度站内搜索所讲进行操作即可

添加swiftype站内搜索:

在github中百度站内搜索不识别,所有添加了swiftype而放弃百度。
网站地址:https://swiftype.com/

参考文档:

创建GitHub技术博客全攻略
用静态页面生成静态博客
About Simple
Github空间在线写文章和用Farbox,Droppages在Dropbox建博客网站
百度站内搜索
使用swiftype实现站内搜索
Sitemap.xml Support

原文地址:http://caojingyou.github.io/004.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

赤龙绕月

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值