Skip to content

Releases: HapLifeMan/nuxt-trustbox-module

v1.1.1

05 Sep 08:14
Compare
Choose a tag to compare

🐛 Bugs

  • Fixed an issue preventing the display of the TrustBox on SSR

🌈 Misc

  • Changed default width from auto to 100% (according to TrustBox default width)

v1.1.0

30 Aug 06:31
Compare
Choose a tag to compare

🎉 Features

  • Added new options tags, schemaType and stars (respectively for data-tags, data-schema-type and data-stars attributes) to handle more TrustBox widgets

v1.0.0

29 Aug 18:59
Compare
Choose a tag to compare

INFORMATION: Please note that this package/module is not for you if you have a Trustpilot Free plan: TrustBoxes are available starting from the Trustpilot Lite plan and can be found here.

📝 Notes

This is the first release of the nuxt-trustbox-module! First of all, a little FAQ 😊

Why this package/module?

Because I use Nuxt for a lot of my projects and the classic TrustBox installation (injection of the script into the head.scripts of the nuxt.config.js configuration file doesn't work).

First I tried to create a plugin that injects the Trustpilot's script, the widget were displayed but only on the first load (SSR). When I switched between pages, if the widget was into the page, it wasn't displayed anymore because there's an initialize function into the script executed on its load.

So I had to re-execute this initialization function when a new trustbox-widget is added to the DOM and after the script was loaded 1 or more pages before. Then I decided to create the <trustbox /> component which calls the initialization function when it's mounted.

Also, as the businessunitId and businessunitName should always be the same on your site, if you want to display multiple TrustBoxes without specifying these attributes each time, I added a config file.

🎉 Features

  • <trustbox /> component provided
  • SSR and client-side navigation support
  • Full translation support (I recommend using nuxt-i18n)