Skip to content

Commit

Permalink
add to docs and fix lock file
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-gohri committed Jul 15, 2022
1 parent 83ea8d6 commit 726141e
Show file tree
Hide file tree
Showing 3 changed files with 1,569 additions and 1,551 deletions.
13 changes: 11 additions & 2 deletions packages/redocusaurus/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
1. Install redocusaurus:

```sh
npm i --save redocusaurus
npm i --save redocusaurus babel-plugin-styled-components@^2
# OR
yarn add redocusaurus
yarn add redocusaurus babel-plugin-styled-components@^2
```

1. Add it as a preset to your docusaurus config along with [@docusaurus/preset-classic](https://docusaurus.io/docs/using-plugins#docusauruspreset-classic) and pass options:
Expand Down Expand Up @@ -82,6 +82,15 @@
};
```

2. Add `babel-plugin-styled-components` to the plugins array of your `babel.config.js`:

```babel.config.js
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
plugins: ['babel-plugin-styled-components']
};
```

The API Doc will be available at the route specified (`/api/` in the example above). To customize it see [full plugin options](https://redocusaurus.vercel.app/docs/getting-started/plugin-options).

### Options
Expand Down
11 changes: 10 additions & 1 deletion website/docs/getting-started/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ author_url: https://rohit.page
```sh
npm i --save redocusaurus
# OR
yarn add redocusaurus
yarn add redocusaurus babel-plugin-styled-components@^2
```

1. Add it as a preset to your docusaurus config along with [@docusaurus/preset-classic](https://docusaurus.io/docs/using-plugins#docusauruspreset-classic) and pass options:
Expand Down Expand Up @@ -83,6 +83,15 @@ yarn add redocusaurus
};
```

2. Add `babel-plugin-styled-components` to the plugins array of your `babel.config.js`:

```babel.config.js
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
plugins: ['babel-plugin-styled-components']
};
```

The API Doc will be available at the path specific by `route`. To skip adding a
route altogether just don't set the `route` property. You will still be
able to reference schema elements manually using [Schema Imports](/docs/guides/schema-imports) or create Custom React Pages using the data and theme components.
Expand Down
Loading

0 comments on commit 726141e

Please sign in to comment.