๐Ÿ‘ฉ๐Ÿผโ€๐Ÿ’ป tech-note

How to update any cells in MySQL?

I forgot about it so, so frequently that I decided to jot down the syntax. For example, to make all the posts unpublished in Ghost: update

I forgot about it so, so frequently that I decided to jot down the syntax.

For example, to make all the posts unpublished in Ghost:

update posts set status = "draft";

Or if you want to add the condition:

update posts set status = "draft" where author_id = "1";

Source: https://stackoverflow.com/a/3024567/2360798

-->
1 min read
๐Ÿ‘ฉ๐Ÿผโ€๐Ÿ’ป tech-note

How to upgrade Ghost?

NOTE: This post is about the prior version of Ghost (0.x). In version 1.0 or later, the Ghost official team supports a tool to upgrade your

NOTE: This post is about the prior version of Ghost (0.x). In version 1.0 or later, the Ghost official team supports a tool to upgrade your app via ghost command line tool.


Take the following steps, which is a short summary of the linked tutorial:

  • Download the latest Ghost and extract it

  • Delete core/, index.js, package.json

-->
1 min read
๐Ÿ‘ฉ๐Ÿผโ€๐Ÿ’ป tech-note

How to create a custom static page in Ghost?

It is simple. Take the following steps: Add a custom page from an admin page, where you enable the "custom page" checklist. Crea

It is simple. Take the following steps:

  • Add a custom page from an admin page, where you enable the "custom page" checklist.

  • Create a page-{customURL}.hbs in the root of your theme directory. The customURL must be the same as the root URL you want. If you show the page at yourblog.com/about, it must be

-->
1 min read
๐Ÿ‘ฉ๐Ÿผโ€๐Ÿ’ป tech-note

How to add a custom route to your Ghost blog?

First, create a custom route directory to your root. Originally I added my custom route files under core/server/, but since it is going to b

First, create a custom route directory to your root. Originally I added my custom route files under core/server/, but since it is going to be overwritten by updates on Ghost, it might be preferrable to make them agnostic about the core directory altogether.

Then, define your own custom routes in whatever way you want. Add routes, controllers, or middlewares,

-->
1 min read
๐Ÿ‘ฉ๐Ÿผโ€๐Ÿ’ป tech-note

Add Google Analytics and Adsense into your Ghost blog

The answer is simple enough to add your script to theme files๐Ÿ™Š Google Adsense Create an ad partial like ad-banner.hbs template and copy/pa

The answer is simple enough to add your script to theme files๐Ÿ™Š

Google Adsense
  1. Create an ad partial like ad-banner.hbs template and copy/paste your ad script to the file.

  2. Edit the relevant files (e.g. index.hbs, post.hbs, etc...) to insert the ad partials.

Google Analytics

To add Google Analytics, not only you can insert the script

-->
1 min read