Hello everyone. I’m using the latest version of Ghost available on my VPS, ubuntu system.
I wanted to try to add some condition for the feature image, in order to save local disk space.
I wanted to make sure that if the feature image is not set in the post, then the first image in the html page that has this id: “this_featured” is taken as the feature image.
What code can I use in the post.hbs file to add this condition?
This is the original code of the “Solo” theme which is in the gh-content gh-canvas section:
{{#unless feature_image}}
<header class="gh-article-header">
<h1 class="gh-article-title">{{title}}</h1>
{{#if custom_excerpt}}
<p class="gh-article-excerpt">{{custom_excerpt}}</p>
{{/if}}
</header>
{{/unless}}