Apart from writing blog posts another good way to get clients is to give relevant high quality talks at meetups and conferences.
This has worked for me on multiple occasions. Pretty much every conference I have spoken at as a consultant has resulted in several leads or a contract.