Skip to content

Commit

Permalink
Remove: Gatsby API
Browse files Browse the repository at this point in the history
Removed SSR and configuration for better compatibility between Gatsby versions.
  • Loading branch information
luciobenini committed Nov 1, 2021
1 parent bf01640 commit 47d9d8d
Show file tree
Hide file tree
Showing 10 changed files with 35,946 additions and 2,389 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
- name: CI
run: npm ci

Expand All @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
registry-url: https://registry.npmjs.org/
- name: CI
run: npm ci
Expand All @@ -44,7 +44,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
registry-url: https://npm.pkg.github.com/
- name: CI
run: npm ci
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ examples
gatsby-plugin-trustpilot-widget.code-workspace
.prettierignore
.prettierrc
src
48 changes: 26 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,7 @@
npm install @pittica/gatsby-plugin-trustpilot-widget
```

## Configuration

Edit your **gatsby-config.js**.

```javascript
module.exports = {
plugins: [
{
resolve: `@pittica/gatsby-plugin-trustpilot-widget`,
options: {
username: "USERNAME",
template: "TEMPLATE_ID",
business: "BUSINESSUNIT_ID"
}
},
],
}
```
## Component Usage

The _username_, _template_ and _business_ fields **are required**.

Expand All @@ -50,8 +33,6 @@ You can get the data from the TrustBox in your businness panel on [Trustpilot](h
<!-- End TrustBox widget -->
```

## Component Usage

Import the component **TrustpilotReviews** in your component.

```javascript
Expand All @@ -70,6 +51,9 @@ class MyComponent extends React.Component {
theme="light"
width="100%"
height="52px"
template="TEMPLATE_ID"
business="BUSINESSUNIT_ID"
username="USERNAME"
/>
)
}
Expand All @@ -85,46 +69,66 @@ The component has optional attributes which the user can use to set the aspect o
Sets the language of the locale and the language of the API.

##### Default Value

`en`

##### Note

If you set the language attribute you have to set the _culture_ attribute too.

#### culture

Sets the culture of the locale.

##### Default Value

`US`

##### Note

If you set the culture attribute you have to set the _language_ attribute too.

#### theme

Sets the UI theme of the TrustBox.

##### Values
* `light`
* `dark`

- `light`
- `dark`

##### Default value

`light`

#### width

Sets the width of the widget.

##### Default Value

`100%`

#### height

Sets the height of the widget.

##### Default Value

`52px`

#### template

Indicates the template ID.

#### business

Indicates the business ID.

#### username

Indicates the username.

## Copyright

(c) 2020-2021, [Pittica S.r.l.](https://pittica.com).
7 changes: 0 additions & 7 deletions gatsby-node.js

This file was deleted.

13 changes: 0 additions & 13 deletions gatsby-ssr.js

This file was deleted.

Loading

0 comments on commit 47d9d8d

Please sign in to comment.