Docs › Hugo

Add a testimonial wall to Hugo

Add a Vouchjar testimonial wall to a Hugo site with a two-line shortcode.

You’ll need a Vouchjar wall. It’s free for up to 5 testimonials: create one, then copy the embed code from step 3 of your dashboard. It already has your wall’s ID in place of your-wall.

layouts/_shortcodes/vouchjar.html
<div data-vouchjar="{{ .Get "wall" }}"></div>
<script src="https://vouchjar.com/embed.js" async></script>
In your Markdown
{{< vouchjar wall="your-wall" >}}

Steps

  1. Create the shortcode file below. Hugo 0.146 and later read shortcodes from layouts/_shortcodes/. Older versions use layouts/shortcodes/.
  2. In any content file, call the shortcode with your wall’s ID.
  3. Rebuild and deploy.

What you’ll get

This is the real widget running the demo wall. Yours shows the testimonials you approve.

Checked against Hugo’s own help docs: gohugo.io

Other platforms