搭建个人博客
注册GitHub账号
创建博客
根据:用静态页面生成静态博客
个性化博客
做自己的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
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
· .NET Core内存结构体系(Windows环境)底层原理浅谈
· C# 深度学习:对抗生成网络(GAN)训练头像生成模型
· .NET 适配 HarmonyOS 进展
· 如何给本地部署的DeepSeek投喂数据,让他更懂你
· 超详细,DeepSeek 接入PyCharm实现AI编程!(支持本地部署DeepSeek及官方Dee
· 用 DeepSeek 给对象做个网站,她一定感动坏了
· .NET 8.0 + Linux 香橙派,实现高效的 IoT 数据采集与控制解决方案
· .NET中 泛型 + 依赖注入 的实现与应用