WebToSpeech

For publishers · Ghost setup guide

Put an audio player on every Ghost post.

Two pastes into Ghost’s Code injection: one line to prove the site is yours, and one to add the player. No theme edits.

You need the Publisher plan, and an Administrator account on the Ghost site, which Code injection asks for.

  1. Step 1

    Add your site to WebtoSpeech

    In WebtoSpeech, open Settings → Sites and add the domain your readers visit, such as yourblog.com. Players only work on that domain and its www. address.

  2. Step 2

    Verify it with a meta tag

    Copy the meta tag WebtoSpeech shows for your site. In Ghost Admin, open Settings → Code injection, paste it into Site header, and save. Then press Verify in WebtoSpeech.

    Leave the tag there. WebtoSpeech checks it again from time to time, and players stop working if it stays missing.

    Code injection → Site header

    <meta name="webtospeech-verification" content="your_verification_code">
  3. Step 3

    Paste the player into Site footer

    Once the site is verified, open its Player tab in Settings → Sites, choose Ghost / code injection, and copy the line. Paste it into Ghost’s Code injection → Site footer, and save.

    Its data-insert attribute puts the player at the top of each post’s body. Pages, the home page, and tag and author pages don’t get one.

    Code injection → Site footer

    <script src="https://webtospeech.app/embed.js" data-site="ws_your_site_key" data-insert=".post-template .gh-content > :first-child" async></script>
  4. Step 4

    Open a post and press play

    The first time anyone presses play on a post, WebtoSpeech reads it, and the audio starts within a few seconds while the rest is generated. Everyone after that gets the finished audio.

    Posts are only read when a visitor presses play, never on page view or by crawlers, so your minutes go on posts people listen to. Each post’s audio and play count are listed under Pages read in Settings → Sites.

Want the player somewhere else?

Edit your theme instead. Download it from Ghost Admin, put the element below in post.hbs exactly where the player should go, and upload the theme again. Use the Theme template snippet from Settings → Sites, or keep the Site footer line: when a page already has the element, the player goes there and no second one is added.

The element also takes data-theme="light" or data-theme="dark" if your site doesn’t follow the reader’s system setting. An update to the theme replaces your edit, so add it again after updating.

post.hbs

<div data-webtospeech></div>

Good to know on Ghost

Edited posts are read again

Ghost marks each post with its canonical address and when it was last updated, so the player needs no settings. After you edit a post, it’s read again the next time someone presses play.

Members-only posts

WebtoSpeech reads a post as a signed-out visitor sees it. On a post for members or paid subscribers, that’s only the free preview above the paywall.

Players on pages too

To give Ghost’s pages a player as well as its posts, change the data-insert value in Site footer to:

.post-template .gh-content > :first-child, .page-template .gh-content > :first-child

Custom themes

Every official Ghost theme, Source and Casper among them, wraps the post body in an element with the class gh-content. If yours doesn’t and no player appears, put the class your theme uses in its place, or edit the theme as above.

Read new posts as you publish

In Settings → Sites, open Feed and podcast and connect your Ghost feed, which is at /rss/ on your site, or just your homepage. Turn on reading new posts as they’re published, and each new post is read a few minutes after it appears in the feed, using your minutes.

Turn your blog into a podcast

With your feed connected, you can publish a public podcast of the posts that have been read, for listeners to follow in Apple Podcasts, Spotify, Overcast or any other app.

The player is on your site only, not in the newsletter emails Ghost sends. See everything else the player does

Questions

Does the Ghost audio player require editing my theme?
No. Using Ghost’s built-in Code injection with the data-insert attribute adds the player automatically to every post without touching post.hbs or re-uploading a theme.
Does adding the player to Ghost require a cookie banner?
No. The WebtoSpeech player sets no cookies, starts no session, and loads no third-party tracking scripts, so it works in Safari and Firefox with third-party cookies blocked.
Can I also turn my Ghost blog into an Apple Podcasts or Spotify feed?
Yes. Connect your Ghost /rss/ feed under Settings → Sites → Feed and podcast to automatically generate audio for new posts and publish a standard podcast RSS feed.

Publisher plan

$29 a month. Unlimited sites.

200 hours of audio a month, every Studio and standard voice, cookie-free embeds, RSS-to-podcast feeds, and play counts.