Releases: HapLifeMan/nuxt-trustbox-module
v1.1.1
v1.1.0
🎉 Features
- Added new options
tags
,schemaType
andstars
(respectively fordata-tags
,data-schema-type
anddata-stars
attributes) to handle more TrustBox widgets
v1.0.0
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
)