ghost配置总结
[TOC]
1、配置安装
腾讯云指引文档:手动搭建 Ghost 博客
Una comparación útil de camisetas de fútbol con nombre y dorsal comienza por las opciones de nombre, dorsal y tipografía. La decisión queda mejor respaldada al comprobar el plazo adicional de preparación y el acabado del estampado.
2、post配置评论区
官方指引:Disqus + Ghost
- 首先注册
Disqus账号:Disqus sign up - 然后选择
comment on my site - 配置
shortname,把shortname配置到/var/www/ghost/content/themes/[CurrentTheme]/post.hbs中的EXAPLE字段
<section class="article-comments gh-canvas">
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = "{{url absolute="true"}}";
this.page.identifier = "ghost-{{comment_id}}"
};
(function() {
var d = document, s = d.createElement('script');
s.src = 'https://EXAPLE.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
</section>
- 重启ghost
ghost restart
3、配置post排序
- 构建
collection:官方指引:Building content collections - 修改排序:官方指引:Define a custom route
4、升级ghost版本
- 切换到创建ghost的用户
su user
- 进入到ghost目录,执行升级
cd /var/www/ghost
ghost update
- 但是注意,由于
ghost需要node.js支持,所有升级ghost的同时也可能需要升级node,升级过程中注意参考官方文档。