How do I change the excerpt to show all content?

To display the full content of your Ghost posts from within your post list, follow these simple steps below to get started.

Open the index.hbs file of your theme

From within your theme directory, find and open your index.hbs file in your HTML editor. The index.hbs template is the template for the homepage, and gets passed a list of posts which should be displayed (and how they should be displayed).

open index.hbs file

Locate the {{excerpt}} helper

The {{excerpt}} helper outputs content, but strips out all HTML, creating an excerpt of each post. In some cases, you may wan to show the full content, rather than the excerpt. To do this, locate the{{excerpt}} from within your index.hbs file, found in the partials directory.

NoteIf using the default theme, Casper, you will need to edit the loop.hbs file, found in the partials directory

find excerpt helper

To show full content, change {{excerpt}} to {{content}}

To output the full text of the post on your post list, change the {{excerpt}} to {{content}} as shown in the below:

switch excerpt for content

Create a custom excerpt that includes HTML

If you’d like create a custom excerpt, that includes HTML, you can change {{excerpt}} to {{content words=”100″}}` which will output 100 words of HTML, with correctly matched tags. So, for example, our code would look like this below:

custom exerpt

Save your theme

Once you’ve modified your index.hbs file to accommodate the type of content you want to display, and how it should look, save your theme and upload it to your blog for the changes to take effect immediately.

Original Article from Ghost.org 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.