I’m on a Ghost Pro installation.
I’m generating content that has a substantial amount of paid-for subscriber-only content. In order to encourage an anonymous site user (i.e. {{^if @member.paid}}
) to become a subscriber I would like to offer a longer excerpt of an article — several paragraphs, say — before the sign-up CTA is displayed.
With core Ghost, all markup is stripped from content displayed to these users in an {{excerpt}}
helper. (I know I can add custom excerpt in the edit form’s text area, but that doesn’t allow/support markup either.)
Alternatively, if I show the site user, say, {{content words="600"}}
and add a partials/content.hbs
file then I seem to only have the excerpt
helper in the available moustache data options there — and it i) has the markup stripped, and ii) is a fair bit less than the 600 words I wanted.
Is there a way around this? Would I need a custom helper to do this? If so, I’m struggling to find an example code for creating a nodejs plugin for Ghost for a custom helper. The examples I’ve found so far seem, I think, out of date for Ghost 3.x (Ghost Pro is on 3.41.3 currently). Or am I looking in the wrong places?