New features being worked on: comments and search

Two new repos have appeared in Ghost’s Github organization

comments-ui

There are references in the code to:

  • Comment replies
  • Comment Likes. Links can be reverted.
  • Comment notifications by email
  • Admins being able to hide comments
  • Users deleting their own comments
  • Comment API
  • Strong HTML santization. Right now only line breaks, paragraph breaks and links will be allowed.
  • It appears you must be a “member” to leave a comment, but you aren’t required to provide a name, just an email. It’s not clear if you ca become a “member” simply by entering your email when leaving a comment.

I see no references to Markdown, but there’s not much need for formatting if the only HTML supported is line breaks, paragraphs and links (perhaps for making bare URLs clickable?)

This is definitely for a “first-party” comment solution because the core Ghost project is also adding a new comments database table to store the comments:

You can see the most recent commits for this work on the simon-says branch:

sodo-search

This code has references to providing a search model that uses the Content API to perform searches. That’s how competing third-party search tools work.

There is a reference to “Searching posts, tags and authors”

This looks like a self-contained tool that could work with any theme like the “member portal”.

The project provides a SVG “search” icon as well.

This feature has already been merged into the “main” branch, meaning the code for it will be shipped in the next release. Currently, it’s set to be released first in “Labs”. Even then, there’s a reference it being behind an “alpha” flag for now, so maybe it won’t be visible in the next release or it will require a change in the config file to expose it.

When enabled, it will inject some JavaScript into the header, causing the search elements to appear, much like how the member portal feature is handled.

I haven’t tried to build and run either feature myself, but others are welcome to explore more.

12 Likes

This is great. Thanks for letting us know, @markstos!

1 Like

Thanks for sharing, I have been waiting built-in search & comment features since the day 1.
Hopefully next feature is media manager tools.

1 Like

This is some great news!

Thanks @markstos!
Search feature it has now been enabled in v.5.3.0.
I have seen that in Ghost 5.3.0, in Alpha features, “Enable comments” has been enabled, but nothing appears. I activate it, but nothing appears, do I have to add something to the post.hbs to finish enabling it?

Thanks!!!

Try the {{comments}} helper in your theme.

1 Like

I was wondering how you enabled the Alpha features?

@ahmadajmi Explained here (with Kevin’s warning):

1 Like

Thanks @Stromfeldt! I added it to the config.development.json on my localhost and it works.

2 Likes

Nothing… Does it work for you?
Another thing… it’ possible translate the “Search posts, tags and authors” in the new search function?

Just tried after enabling the Alpha feature but it didn’t work too. Not sure why.

I don’t think so.

The search feature is now documented here. All the official themes have been updated to support it, while there are instructions for adding it to other themes.

Thanks for sharing, @markstos. I was just looking for a commenting solution for Ghost, and didn’t want to rely on third-party software. Really looking forward to native comments for Ghost.

I wonder how quickly we could see this live (not in alpha)… I’ve been trying out Cove, which definitely has nice things about it. But something even more baked in could definitely be good.

2 Likes

My guess is that seeing how even with Portal subscribers/members can’t set an avatar besides going through Gravatar (which Joe/Jane Blow isn’t aware of) that they will be able to set an avatar with Ghost Explore. Which will then provide more exposure for Ghost Explore and thus Ghost sites themselves.

But I could be totally wrong.

Closing this thread as both of these features have now been shipped :tada:

1 Like