Ghost icon indicating copy to clipboard operation
Ghost copied to clipboard

<!---more---> tag or equivalent for ghost

Open arianf opened this issue 11 years ago • 10 comments

I've been transferring over from WordPress and I am trying to find the equivalent for the <!---more---> tag that is used in wordpress to signify where to cut the content for a post preview. Is there something similar in ghost?

http://codex.wordpress.org/Customizing_the_Read_More

arianf avatar Feb 20 '15 02:02 arianf

After looking further into it, it seems like the Read More tag is set by the theme. For example, casper sets it to 26 words.

    <section class="post-excerpt">
        <p>{{excerpt words="26"}} <a class="read-more" href="{{url}}">&raquo;</a></p>
    </section>

It would be nice if the themes took into account a certain tag if it was set.

Like for example {{</preview>}} or {{excerpt words="26"}}

arianf avatar Feb 20 '15 02:02 arianf

@arianf I think the same and I improve core/helpers for it on local and make pull request: https://github.com/TryGhost/Ghost/pull/4885

Pestov avatar Mar 01 '15 14:03 Pestov

Shouldn't this be closed now?

sebie avatar Mar 15 '15 00:03 sebie

They haven't merge anything yet, have they?

arianf avatar Mar 15 '15 03:03 arianf

Thought this happend?

sebie avatar Mar 15 '15 04:03 sebie

I closed that one myself, it wasn't merged. I resubmitted another pull request here: #4973

arianf avatar Mar 15 '15 21:03 arianf

Ahh, makes sense. Thanks.

sebie avatar Mar 16 '15 05:03 sebie

The <!--more--> feature in WordPress is a relic which was inherited from the old b2 blogging platform. It has seemingly been passed down from platform to platform without much thought. It's a developer-centric hack that is not at all user friendly and really doesn't fit into Ghost.

In addition to this, it also introduces a contract between the content and how it is displayed which is very different to how excerpts work currently in Ghost. The excerpt of your content, and whether there even needs to be one, is determined by your theme and the style of blog the theme creates. Introducing a method of overriding what the theme determines at the post level is not a trivial change to that relationship, and furthermore it brings with it the expectation that anything consuming content from Ghost would honour that contract - not just themes, but RSS feeds, apps, extensions and any 3rd party Ghost client.

We certainly want to improve Ghost's excerpts but not by simply copying the behaviour of platforms that came before us.

ErisDS avatar Mar 21 '15 14:03 ErisDS

@ErisDS Do you have something in mind for improving Ghost's excerpts? The improve link you've got is self-referential and it's not clear whether you want to allow customizing excerpts at all due to the contract.

jcrben avatar Mar 30 '15 19:03 jcrben

@jcrben sorry, the improve link was supposed to point to another issue - now updated

ErisDS avatar Mar 30 '15 20:03 ErisDS