博客托管服务迁移记(下)
折腾一下 ghost 自定义配置
博客托管服务迁移的竞品调研可以参考:博客托管服务迁移记(上)
1、blogging 工作流
2、ghost 自定义优化
2.1、ghost code injection
- 代码高亮配置:Tutorial: A complete guide to code samples in Ghost
- ghost search 配置:TryGhost/Dawn: A minimal newsletter theme for Ghost
- Google analytics 配置:Official Ghost + Google Analytics Integration
- Other CSS Style 配置:Ghost code injection 修改主题 – Notecore
- 修改页面使用字体配置:How to use Google Fonts on Ghost
最终配置如下图所示:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxxx-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-xxxxxxxxx-1');
</script>
<!-- Ghost Search -->
<script>
var gh_search_key = 'API_KEY';
var gh_search_migration = 'v2';
var gh_search_content = true;
</script>
<!-- prism -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/themes/prism.min.css" integrity="sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/themes/prism-solarizedlight.min.css" integrity="sha512-fibfhB71IpdEKqLKXP/96WuX1cTMmvZioYp7T6I+lTbvJrrjEGeyYdAf09GHpFptF8toQ32woGZ8bw9+HjZc0A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/plugins/line-numbers/prism-line-numbers.min.css" integrity="sha512-cbQXwDFK7lj2Fqfkuxbo5iD1dSbLlJGXGpfTDqbggqjHJeyzx88I3rfwjS38WJag/ihH7lzuGlGHpDBymLirZQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/plugins/inline-color/prism-inline-color.min.css" integrity="sha512-jPGdTBr51+zDG6sY0smU+6rV19GOIN9RXAdVT8Gyvb55dToNJwq2n9SgCa764+z0xMuGA3/idik1tkQQhmALSA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/plugins/toolbar/prism-toolbar.min.css" integrity="sha512-Dqf5696xtofgH089BgZJo2lSWTvev4GFo+gA2o4GullFY65rzQVQLQVlzLvYwTo0Bb2Gpb6IqwxYWtoMonfdhQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- css sytle -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Charmonman">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Berkshire Swash">
<style>
header {
font-family: 'Charmonman', 'Berkshire Swash';
}
span.log-text{
font-family: 'Charmonman';
font-style: bold oblique 60deg;;
}
div.cover-description{
font-family: 'Berkshire Swash';
font-style: oblique;
color: purple;
}
button.button-text.menu-item.members-account.gh-portal-close,button.button-text.menu-item.menu-item-cta.members-upgrade.gh-portal-close{
font-family: sans-serif;
}
</style>
<!-- FOOTER -->
<!-- prism -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/prism.min.js" integrity="sha512-pSVqGtpGygQlhN8ZTHXx1kqkjQr30eM+S6OoSzhHGTjh6DKdfy7WZlo1DNO9bhtM0Imf6xNLznZ7iVC2YUMwJQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js" integrity="sha512-pUNGXbOrc+Y3dm5z2ZN7JYQ/2Tq0jppMDOUsN4sQHVJ9AUQpaeERCUfYYBAnaRB9r8d4gtPKMWICNhm3tRr4Fg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/plugins/line-numbers/prism-line-numbers.min.js" integrity="sha512-dubtf8xMHSQlExGRQ5R7toxHLgSDZ0K7AunqPWHXmJQ8XyVIG19S1T95gBxlAeGOK02P4Da2RTnQz0Za0H0ebQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/plugins/inline-color/prism-inline-color.min.js" integrity="sha512-U2u7V7F0Yk6Cw3LrZMYBDKQ+FbGigq+Z0JhHI04iKjtNXZUm4RdHsJ4xVbJLTiIFhNZ/5/3M12I1wXQtvxXB/w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/components/prism-go-module.min.js" integrity="sha512-NnzyLYRV5+Q9Wv2sxHYSOsUt6Yi15NKPFcCK8vbNgcKNXJvyusG5Hy+rQ0X4GNvYEPVnbV30PTIsdrZBdAtRug==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/components/prism-go.min.js" integrity="sha512-w200Nz1i9KgDNi+IpPMgpZBVRIvfVK/V5vskyHjkz7XJkVnRJcb1uNmpiHhDv0/Ln+GG2VqScKKz/1izBfg64Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/components/prism-python.min.js" integrity="sha512-AKaNmg8COK0zEbjTdMHJAPJ0z6VeNqvRvH4/d5M4sHJbQQUToMBtodq4HaV4fa+WV2UTfoperElm66c9/8cKmQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/components/prism-c.min.js" integrity="sha512-8VrjxGFLIkS0mgEmO3p46A5OkqATHhrNVwyv2V7yUeZrk1jmSDuI3SOEpC9XHEHUWEOsfzzcJeBlUkee9lKGrw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/components/prism-cpp.min.js" integrity="sha512-UYkJiZs5kymKJMPLLVBpexawnvmoh9jMW9H10z96GF8ldp6SDS8FI4BhBMa2rbHoCyc8mc8gSAMgqIj6NXtmYg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/components/prism-rust.min.js" integrity="sha512-Jb6/UFH4bS7+zjvvDzi1+c6N2BbvFzlTAtq4n/NuszdntHzoOQkTf2AerODTeaAdSBbfMgrF09eToNE1k8+G6Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.26.0/plugins/toolbar/prism-toolbar.min.js" integrity="sha512-YrvgEHAi5/3o2OT+/vh1z19oJXk/Kk0qdVKbjEFl9VRmcLTaWRYzVziZCvoGpJ2TrnV7rB8pnJcz1ioVJjgw2A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
2.2、integration
目前只集成了:
- Zapier 发送到 twitter
- Zapier slack 频道同步
- Zapier Google Docs 直接发布到 ghost
- AMP 支持 Google Analytics
Google Analytics 监控如下图所示:
Obsidian 一键发布集成有待支持
2.3、ghost pro 订阅
除了 theme 和 integration 可以自定义之外,Starter 和 Creator 没有其他区别。所以目前暂时打算订阅 Starter。
2.4、domain 订阅
目前 'edonymu.com' 这个域名在 wordpress.com 名下管理,考虑过迁移到 godaddy 上做管理,但是发现 godaddy 付费有点坑:
所以还是继续在 wordpress 上续费 domain 吧。
以上,就是 blog 托管所有的工作。
Public discussion