Search for Ghost blog engine

Ghost is a great blog engine but it misses a built-in searching capability. Trying to find some help on the Ghost forum I finally found these resources:

After few tries to understand how it works, I finally have a functional Casper-based theme for my blog with a great search functionality.