You may have noticed my snazzy "read on" links on my home page. To me, it wasn't obvious that the title was a link to the whole post. This is a simple improvement I made to the default Ghost template "Casper". This should work for any template but I will be using the default for this tutorial.
- Get a copy of the template you want to change.
- Edit
casper/index.hbs Find
{{excerpt}}, this prints the partial post to the page. My Casper template looked like this:<section class="post-excerpt"> <p>{{excerpt}}…</p> </section>You can use
{{url}}to retrieve the URL to the post. I updated the above code to the following:<section class="post-excerpt"> <p>{{excerpt}}… <a href="{{url}}">read on</a></p> </section>You will want to make the same update to
tag.hbsand any other places your template may show partial posts. Usegrep -r '{{excerpt}}' .to find references.- Copy your new template to
{ghost source}/content/themes/ - Restart Ghost.
- Select your new theme in settings, save, done!