mrvautin

How to change the post excerpt of your Ghost theme to HTML

The Casper theme by default has an excerpt with all HTML tags / formatting removed. You can change this in your theme by editing the /content/themes/mytheme/partials/loop.hbs file of your theme.

In the loop.hbs file you will see:

{% raw %}
{{excerpt words="26"}}
{% endraw %}

You will need to change the word excerpt to content. The new code will be:

{% raw %}
{{content words="26"}}
{% endraw %}

If you are wanting to change the length (amount of words) of the excerpt please see here.

Tags:
theme | ghost-tag | excerpt | html |

Related posts