Skip to content

Commit

Permalink
feat: Updated documentation about using the add-on
Browse files Browse the repository at this point in the history
  • Loading branch information
ericof committed Aug 8, 2022
1 parent 1e3d070 commit a0dce7d
Showing 1 changed file with 28 additions and 8 deletions.
36 changes: 28 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,6 @@ yo @plone/volto my-volto-project --addon @plonegovbr/volto-vlibras
cd my-volto-project
```

Install new add-on and restart Volto:

```shell
yarn install
yarn start
```

### Existing Volto Project

If you already have a Volto project, just update `package.json`:
Expand All @@ -58,10 +51,37 @@ If you already have a Volto project, just update `package.json`:
"@plonegovbr/volto-vlibras": "*"
}
```
### Configuration <a name="config"></a>

To inject the component in the project add the appextras configuration in the config.js file.

A suggested way is to use `appExtras` from settings object ([docs](https://6.dev-docs.plone.org/volto/recipes/appextras.html)):

```jsx
import Libras from '@plonegovbr/volto-vlibras/components/Libras';

export const settings = {
...defaultSettings,
appExtras: [
...defaultSettings.appExtras,
{
match: '',
component: Libras,
},
],
};
```

### Test it

Go to http://localhost:3000/
After adding the add-on, and its configuration, you need to install it and then `start` the project:

```shell
yarn install
yarn start
```

Then go to http://localhost:3000/

## Contribute

Expand Down

0 comments on commit a0dce7d

Please sign in to comment.