Whether you are self-hosting or using a managed host for Ghost, sooner or later you might need to customize and add features to your website. Some of the important features that you will find missing immediately are Search & Comments.
In this article, I will show how to easily address these features. You will learn more about customization in future articles. To keep yourself informed, you can subscribe at the end of this article. If you are new to Ghost platform, you might enjoy:
- Get up to speed with Ghost
- Self hosting Ghost using DigitalOcean
- Self hosting Ghost using AWS
- Where to host Ghost?
- Learn Markdown
The Core Mantra
Instead of developing a feature from scratch, the core mantra for customization is FIND > EMBED > ENJOY! It is much faster to reuse than reinvent. Sometimes, you might not find exactly what you are looking for, and hence you will need to customize the code to get the functionality.
Add Search Functionality
Search functionality... you can use Google's Custom Search Engine (CSE).
Create a custom search engine by visiting this link and clicking the
Create a custom search engine button.
Add the name of your website. You can view the different examples mentioned so that you can fine-tune your search.
Get the code by clicking
Receive Code button.
Copy the code and paste it in an appropriate location of your website. If you are using the default
Casper theme of Ghost, you can open
/content/themes/casper/post.hbs file and paste the code just after
</footer> or a location that you feel more appropriate!
You can now style the Search box appropriately based on your theme.
Add Comments Functionality
Sticking to the core mantra, you can find a comments plugin from various websites and add it to your website. The most popular ones are Disqus and Facebook comments.
As you can see, customizing a Ghost website is not as difficult for common needs. If you need more customization, you can download and use themes... or better yet, create your own themes! For such needs and more, you can contact us or check out web solutions page for details.
Well, stay tuned for upcoming articles. Say hi, share this article, leave a comment or Subscribe now to stay updated through our newsletter. Also, check out our services or contact us at firstname.lastname@example.org for your software and consultancy requirements.