Overview
With recommendations, publishers can share their favorite sites with their readers and, likewise, be recommended by other publications. See the Changelog for an overview of this feature.
See your site’s recommendations
- The recommendations modal is shown automatically whenever a new member subscribes to a Ghost publication.
- Visiting
https://yoursite.com/#/portal/recommendations
will open the recommendations modal. Use this URL as a link in the navigation menu to create a recommendation button. - See additional methods for opening the recommendations modal in our theme docs.
How Ghost sends a recommendation
When you make a recommendation, it shows on your website and in Portal atyoursite.com/#/portal/recommendations
. Behind the scenes, Ghost performs the following steps:
- Ghost checks to see if the recommended site has Webmentions enabled. While it’s possible to recommend any site, Ghost only notifies sites about your recommendation if they have a Webmention endpoint that can receive it.
-
Ghost adds the recommendation to your site’s
/.well-known/recommendations.json
file. Here’s an example of this file:
- Ghost notifies the recommended site via a Webmention. This takes the form of a POST request to the endpoint discovered in step 1 and contains a reference to your site’s
recommendations.json
file. Here’s an example of a request:
How Ghost receives a recommendation
Your site receives recommendations in the same way as described above but as the recipient.- Ghost automatically adds a
link
tag to your publication to inform other sites about your Webmention endpoint. That tag looks like this:
- Ghost listens for Webmentions on this endpoint. Once the incoming recommendation is verified, it’s added to Ghost Admin and you receive a notification.
Updates and removals
If you update or remove a recommended site, Ghost sends an updated Webmention about the change. Likewise, your site will be automatically updated whenever it receives an incoming recommendation change.Theme support
Theme developers can extend the recommendation feature by using therecommendations
and readable_url
helpers. See the documentation for these features to learn more.