You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/writing-examples.md
+4-12Lines changed: 4 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,23 +46,15 @@ files or using environment variables).
46
46
- Develop the example independently of the library as a standalone
47
47
mini-application (using `npm install` and `npm start` to start the vite
48
48
dev-server).
49
-
- If you install additional dependencies, the "Examples" section of [the website](https://visgl.github.io/react-google-maps/examples/) will not be able to host your example, but you can still [link to a CodeSandbox](https://codesandbox.io/docs/learn/devboxes/synced-templates#creating-a-synced-template) for the example.
50
49
- Edit the title, description and sourcecode links in the
51
50
`README.md`, `index.html`, and `./src/control-panel.tsx` files.
52
51
53
52
### Adding examples to the website
54
53
55
-
If you are adding an example with **no additional dependencies**:
56
-
57
-
1. Create the example page in `./website/src/examples/your-example-id.mdx`
58
-
2. Add the example to `./website/src/examples-sidebar.js`
59
-
3. Create a 400x400 px image for the overview page and place it in
54
+
- Create the example page in `./website/src/examples/your-example-id.mdx`
55
+
- Add the example to `./website/src/examples-sidebar.js`
56
+
- Create a 400x400 px image for the overview page and place it in
4. The whole website can be started in dev-mode by running `npm i` and
58
+
- The whole website can be started in dev-mode by running `npm i` and
62
59
`npm start` in the `./website` directory. The website build can be tested
63
60
by running `npm run build`.
64
-
65
-
If you are adding an example **with additional dependencies**:
66
-
67
-
1. Create a 400x400 px image for the overview page and place it in `./website/static/images/examples/your-example-id.jpg`
68
-
2. Add the example to `./website/src/examples-sidebar.js` as an [external link](https://docusaurus.io/docs/sidebar/items#sidebar-item-link) to [a CodeSandbox](https://codesandbox.io/docs/learn/devboxes/synced-templates#creating-a-synced-template) based on the title of your new example folder in the `./examples` folder.
0 commit comments