Override in layouts/, not themes/
Copy single.html from your theme into your root layouts/ directory before editing so updating the theme submodule never wipes out the player.
For publishers · Add an audio player to a Hugo blog
Add two lines to your Hugo single post layout and every article gets a fast, cookie-free audio player—with zero npm dependencies and no impact on build time.
Works with PaperMod, Congo, Blowfish, Ananke, and custom Hugo themes. Requires the Publisher plan.
Step 1
Open Settings → Sites, add your site’s domain, and copy your verification token and ws_ site key.
Step 2
Add the meta tag to your site’s head partial (for example layouts/partials/extend_head.html in PaperMod) or add the DNS TXT record, build and deploy, then click Verify.
layouts/partials/extend_head.html
<meta name="webtospeech-verification" content="your_verification_code">
Step 3
Override your theme’s single template in your project’s own layouts/_default/single.html and add the player just above {{ .Content }}.
layouts/_default/single.html
{{ if eq .Section "posts" }}
<div data-webtospeech></div>
<script src="https://webtospeech.app/embed.js" data-site="ws_your_site_key" async></script>
{{ end }}
Step 4
Hugo compiles static HTML as fast as ever. The first time a visitor clicks play on a post, WebtoSpeech reads it and caches the finished audio for everyone else.
Enable enableGitInfo = true in hugo.toml and render .Lastmod in article:modified_time so updated posts are re-read automatically.
Wrap the snippet in {{ if not .Params.noAudio }} so you can skip short link posts or announcements by setting noAudio = true in front matter.
layouts/_default/single.html
{{ if and (eq .Section "posts") (not .Params.noAudio) }}
<div data-webtospeech></div>
<script src="https://webtospeech.app/embed.js" data-site="ws_your_site_key" async></script>
{{ end }}
Copy single.html from your theme into your root layouts/ directory before editing so updating the theme submodule never wipes out the player.
Hugo generates /index.xml or /posts/index.xml automatically. Connect it in Settings → Sites → Feed and podcast to turn every new post into a podcast episode.
Many Hugo bloggers avoid trackers and cookie banners altogether. WebtoSpeech sets zero cookies and makes no third-party tracking calls.
Because audio is generated lazily when a visitor presses play (or via your RSS feed), hugo --minify stays completely offline and millisecond-fast.
Platform guide
Drop two lines with is:inline into your Astro BlogPost layout—zero hydration overhead and full dark mode support.
Platform guide
Two lines in your 11ty post layout—zero build-time bloat, front-matter opt-out, and automatic podcast from your Atom feed.
Podcast workflow
Connect any verified blog’s RSS or Atom feed to auto-generate episodes for Apple Podcasts, Spotify, and Overcast.
Publisher plan
200 hours of audio a month, every Studio and standard voice, cookie-free embeds, RSS-to-podcast feeds, and play counts.