My ghost upgrade script
Posted
最后的最后,还是写了一个: 一行命令就升级ghost的脚本(包括:ghost升级、google font cdn优化、首页摘要显示优化、logo优化、首页图片显示优化、prism高亮code、disqus评论)。
####Environment before using:
- Ubuntu 14.04 (or similar)
- ghost0.5.x
- npm/nodejs/forever
####How to use:
- clone to
folder-of-code
- add executable permission to
upgrade_ghost.sh
andstart_ghost.sh
like this:chmod a+x folder-of-code/*.sh
- change
folder-of-ghost
instart_ghost.sh
to actual ghost folder - If you need comments (Disqus only), upgrade like this:
folder-of-code/upgrade_ghost.sh folder-of-ghost folder-of-code Disqus_forum_shortname
, otherwise:folder-of-code/upgrade_ghost.sh folder-of-ghost folder-of-code
- Waiting…
LOL~ Enjoy your ghost~
####What’s upgrade_ghost.sh
doing:
step1: stop ghost
step2-5: download latest ghost and install(how-to@ghost.org)
step6: (If you’re out of China, please ignore/comment this step.) 针对国内google fonts被墙,导致访问性能极差做的优化(使用360的cdn)。
step7: show content rather than excerpt @index
step8: make logo looks better,and limit index image width
step9: use prism to highlight syntax
step10: add disqus comment(how-to@disqus.com,how-to@ghost.org)
step11: restart ghost
That’s all~