How to install Cove on your Ghost site

Filed in Setup & installation

To install Cove into Ghost, you need to:

  1. enable Members in Ghost, including setting up the email system
  2. download and edit your current Ghost theme
  3. re-upload your theme

This page serves as a simple overview of installing Cove. In your Cove account you will find detailed steps, with code to copy and paste.

1. Set up Ghost Members

Make sure your Ghost site is running version 3.9.0 or later. Cove does not work on earlier versions. If your site is running an earlier version, read these instructions to upgrade it.

The next thing to do (if you haven't already) is to set up Members in your Ghost site's admin. Follow these instructions from the Ghost Documentation.

You also need to set up an email service to will deliver your Ghost log in and confirmation emails. Follow these instructions.

2. Download your current Ghost theme and make some edits

Installing Cove requires some copy-paste tasks, inserting some HTML into your theme files. This will work on any theme.

For example, this is the code you would copy and paste into a post page to show the comments. This example will show comments to all visitors but will require signing in to leave a comment.

{{#if @labs.members}}
  <h2><span id="cove-count"></span> Comments</h2>
  <div id="cove"></div>

  {{#if @member}}
    <p>Signed in as {{@member.email}} · <a href="javascript:" data-members-signout>Sign out</a></p>
  {{else}}
    <p>Become a {{@site.title}} member below to join the conversation (it's free!). As a member, you will also receive new posts by email (you can unsubscribe at any time).</p>
    <form data-members-form="signin" id="cove-login">
      <input class="cove-input" data-members-email type="email" required="true" placeholder="your@email.com" />
      <button type="submit" class="cove-button">Sign in to comment</button>
      <span class="signin-success" style="display:none">Great! Please check your inbox for a log in link.</span>
      <span class="signin-error" style="display:none">Something didn't work. Please try again.</span>
    </form>
  {{/if}}

  <script>
  const Cove = {
    publication: "your_site_id",
    contentId: "{{id}}",
    memberId: "{{@member.uuid}}",
    memberEmail: "{{@member.email}}"
  }
  </script>
{{/if}}

You also need to add Cove's single Javascript file.

3. Re-upload your theme

Once you have made the edits in your theme, you can ZIP the theme folder and simply re-upload it within Ghost. Cove will be available instantly on your site and your members can start commenting right away.

You've successfully subscribed to Cove!