TryGhost / Lyra

A paid-members theme for Ghost
https://lyra.ghost.io
MIT License
178 stars 109 forks source link

Ability to have featured posts #61

Closed Michael-Brooks closed 4 years ago

Michael-Brooks commented 4 years ago

I have a blog post that I set as featured within the admin section of Ghost and since then I've added more blog posts. My issue is that the latest posts are pushing my featured post down which I wasn't expecting.

Are featured posts implemented with the Lyra theme?

TheodoreChu commented 4 years ago

I don't think Featured Posts are implemented in the Lyra theme. I think the posts on the front page are displayed with latest on top.

Michael-Brooks commented 4 years ago

Thanks @TheodoreChu I checked the code out and implemented featured posts in a similar way to the Editorial theme.

Is there a reason why featured posts haven't been implemented before on this theme, or shall I go ahead and create a PR based on this feature? I think it would be helpful for a lot of users.

TheodoreChu commented 4 years ago

Do you have a live example of what your implementation looks like? I'm not sure why featured posts haven't been implemented on Lyra yet. (I'm not part of the core team) I'm guessing that part of it is that it hasn't been implemented on Casper, and Lyra is mostly a version of Casper that allows for paid subscriptions. Maybe there's also no consensus on how to format multiple featured posts on these themes?

Michael-Brooks commented 4 years ago

You can see it working on my blog (https://blog.michaelbrooks.dev). It's the same as Editorial where it only shows 1 featured post at the top which I believe is the latest. It then shows again in the "Recent posts" section (https://github.com/TryGhost/Editorial/blob/master/index.hbs) my code can also be seen here https://github.com/michael-brooks-developments-ltd/Lyra/blob/master/partials/featured-post-card.hbs

What you say also makes a lot of sense, and I appreciate your feedback on this issue.

kevinansfield commented 4 years ago

'm not sure why featured posts haven't been implemented on Lyra yet

How featured posts are handled is typically quite site-specific which is why they aren't implemented everywhere in starter themes. Think of Casper and Lyra as starting points for you to build upon and adapt to your site's specific requirements 🙂

Michael-Brooks commented 4 years ago

Ah okay, thank you both for taking the time to reply. As I've implemented this myself and understand what Lyra is trying to achieve, I'll close the comment. Thanks again.