Talkyard + Ghost

How to use Ghost and Talkyard together

Add comments to your Ghost posts without ads or tracking, with a Talkyard integration

Talkyard allows you to embed fully functional comment threads on Ghost posts and pages without any ads or tracking. It’s an open source project which can be self-hosted, or you can use their hosted service.

This guide will walk you through how to integrate Talkyard with your Ghost site using their hosted service. For further information about self-hosting read their technical guide.

Create a Talkyard account

Sign up for Talkyard Blog Comments and choose an appropriate plan for your needs.

Enter your site

Upon signing up, you will be prompted to enter your site’s domain where you can set up your Ghost publication with Talkyard:

Select Ghost in the settings

Once you have reviewed the intro tour of the Talkyard tool, head to the embedded comments section of the settings in Talkyard. From here you should choose Ghost, and copy the HTML code provided to your clipboard:

Add the code to your theme

Next, in your Ghost theme, locate the template file where you want to insert comments on your site. This is usually inside post.hbs, right after the content of your posts.

In Casper, Ghost’s default theme, you’ll see a line of code specifically reserved for inserting comments. This is where you’ll want to paste the embed code:

Make sure you remove the comments on line 65 and 69. Afterwards, you’ll see something like this:

<section class="post-full-comments">
    <script>talkyardServerUrl='https://comments-for-yoursite.com.talkyard.net';</script>
        <script async defer src="https://c1.ty-cdn.net/-/talkyard-comments.min.js"></script>
        <!-- You can specify a per page discussion id on the next line, if your URLs might change. -->
        <div class="talkyard-comments" data-discussion-id="ghost-{{comment_id}}" style="margin-top: 45px;">
        <noscript>Please enable Javascript to view comments.</noscript>
        <p style="margin-top: 25px; opacity: 0.9; font-size: 96%">Comments powered by
        <a href="https://www.talkyard.io">Talkyard</a>.</p>
        </div>
</section>

Update your theme

Once you’ve updated the active version of your theme in Ghost Admin, your Talkyard integration will be ready to go.

Here’s an example of what Talkyard comments look like on a Ghost site:

For further help with using Talkyard to power your site’s comments, head to their dedicated support forum.