Read-More Links on Ghost

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.

  1. Get a copy of the template you want to change.
  2. Edit casper/index.hbs
  3. Find {{excerpt}}, this prints the partial post to the page. My Casper template looked like this:

    <section class="post-excerpt">
        <p>{{excerpt}}&hellip;</p>
    </section>
    
  4. 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}}&hellip; <a href="{{url}}">read on</a></p>
    </section>
    
  5. You will want to make the same update to tag.hbs and any other places your template may show partial posts. Use grep -r '{{excerpt}}' . to find references.

  6. Copy your new template to {ghost source}/content/themes/
  7. Restart Ghost.
  8. Select your new theme in settings, save, done!