Skip to content

Commit f8561c0

Browse files
authored
doc: fix embed paths (#354)
1 parent 7f4a9ed commit f8561c0

File tree

9 files changed

+111
-111
lines changed

9 files changed

+111
-111
lines changed

.github/dependabot.yml

+53-53
Original file line numberDiff line numberDiff line change
@@ -6,267 +6,267 @@ updates:
66
interval: daily
77

88
- package-ecosystem: npm
9-
directory: /1_hello_world/nan
9+
directory: /
1010
schedule:
1111
interval: daily
1212

1313
- package-ecosystem: npm
14-
directory: /1_hello_world/napi
14+
directory: /src/1-getting-started/1_hello_world/nan
1515
schedule:
1616
interval: daily
1717

1818
- package-ecosystem: npm
19-
directory: /1_hello_world/node-addon-api-addon-class
19+
directory: /src/1-getting-started/1_hello_world/napi
2020
schedule:
2121
interval: daily
2222

2323
- package-ecosystem: npm
24-
directory: /1_hello_world/node-addon-api
24+
directory: /src/1-getting-started/1_hello_world/node-addon-api-addon-class
2525
schedule:
2626
interval: daily
2727

2828
- package-ecosystem: npm
29-
directory: /2_function_arguments/nan
29+
directory: /src/1-getting-started/1_hello_world/node-addon-api
3030
schedule:
3131
interval: daily
3232

3333
- package-ecosystem: npm
34-
directory: /2_function_arguments/napi
34+
directory: /src/1-getting-started/2_function_arguments/nan
3535
schedule:
3636
interval: daily
3737

3838
- package-ecosystem: npm
39-
directory: /2_function_arguments/node-addon-api
39+
directory: /src/1-getting-started/2_function_arguments/napi
4040
schedule:
4141
interval: daily
4242

4343
- package-ecosystem: npm
44-
directory: /3_callbacks/nan
44+
directory: /src/1-getting-started/2_function_arguments/node-addon-api
4545
schedule:
4646
interval: daily
4747

4848
- package-ecosystem: npm
49-
directory: /3_callbacks/napi
49+
directory: /src/1-getting-started/3_callbacks/nan
5050
schedule:
5151
interval: daily
5252

5353
- package-ecosystem: npm
54-
directory: /3_callbacks/node-addon-api
54+
directory: /src/1-getting-started/3_callbacks/napi
5555
schedule:
5656
interval: daily
5757

5858
- package-ecosystem: npm
59-
directory: /4_object_factory/nan
59+
directory: /src/1-getting-started/3_callbacks/node-addon-api
6060
schedule:
6161
interval: daily
6262

6363
- package-ecosystem: npm
64-
directory: /4_object_factory/napi
64+
directory: /src/1-getting-started/4_object_factory/nan
6565
schedule:
6666
interval: daily
6767

6868
- package-ecosystem: npm
69-
directory: /4_object_factory/node-addon-api
69+
directory: /src/1-getting-started/4_object_factory/napi
7070
schedule:
7171
interval: daily
7272

7373
- package-ecosystem: npm
74-
directory: /5_function_factory/nan
74+
directory: /src/1-getting-started/4_object_factory/node-addon-api
7575
schedule:
7676
interval: daily
7777

7878
- package-ecosystem: npm
79-
directory: /5_function_factory/napi
79+
directory: /src/1-getting-started/5_function_factory/nan
8080
schedule:
8181
interval: daily
8282

8383
- package-ecosystem: npm
84-
directory: /5_function_factory/node-addon-api
84+
directory: /src/1-getting-started/5_function_factory/napi
8585
schedule:
8686
interval: daily
8787

8888
- package-ecosystem: npm
89-
directory: /6_object_wrap/nan
89+
directory: /src/1-getting-started/5_function_factory/node-addon-api
9090
schedule:
9191
interval: daily
9292

9393
- package-ecosystem: npm
94-
directory: /6_object_wrap/napi
94+
directory: /src/1-getting-started/6_object_wrap/nan
9595
schedule:
9696
interval: daily
9797

9898
- package-ecosystem: npm
99-
directory: /6_object_wrap/node-addon-api
99+
directory: /src/1-getting-started/6_object_wrap/napi
100100
schedule:
101101
interval: daily
102102

103103
- package-ecosystem: npm
104-
directory: /7_factory_wrap/nan
104+
directory: /src/1-getting-started/6_object_wrap/node-addon-api
105105
schedule:
106106
interval: daily
107107

108108
- package-ecosystem: npm
109-
directory: /7_factory_wrap/napi
109+
directory: /src/1-getting-started/7_factory_wrap/nan
110110
schedule:
111111
interval: daily
112112

113113
- package-ecosystem: npm
114-
directory: /7_factory_wrap/node-addon-api
114+
directory: /src/1-getting-started/7_factory_wrap/napi
115115
schedule:
116116
interval: daily
117117

118118
- package-ecosystem: npm
119-
directory: /8_passing_wrapped/nan
119+
directory: /src/1-getting-started/7_factory_wrap/node-addon-api
120120
schedule:
121121
interval: daily
122122

123123
- package-ecosystem: npm
124-
directory: /8_passing_wrapped/napi
124+
directory: /src/1-getting-started/a-first-project/node-addon-api
125125
schedule:
126126
interval: daily
127127

128128
- package-ecosystem: npm
129-
directory: /8_passing_wrapped/node-addon-api
129+
directory: /src/2-js-to-native-conversion/8_passing_wrapped/nan
130130
schedule:
131131
interval: daily
132132

133133
- package-ecosystem: npm
134-
directory: /a-first-project/node-addon-api
134+
directory: /src/2-js-to-native-conversion/8_passing_wrapped/napi
135135
schedule:
136136
interval: daily
137137

138138
- package-ecosystem: npm
139-
directory: /array_buffer_to_native/node-addon-api
139+
directory: /src/2-js-to-native-conversion/8_passing_wrapped/node-addon-api
140140
schedule:
141141
interval: daily
142142

143143
- package-ecosystem: npm
144-
directory: /async-iterator/node-addon-api
144+
directory: /src/2-js-to-native-conversion/array_buffer_to_native/node-addon-api
145145
schedule:
146146
interval: daily
147147

148148
- package-ecosystem: npm
149-
directory: /async_pi_estimate/nan
149+
directory: /src/5-async-work/async-iterator/node-addon-api
150150
schedule:
151151
interval: daily
152152

153153
- package-ecosystem: npm
154-
directory: /async_pi_estimate/node-addon-api
154+
directory: /src/5-async-work/async_pi_estimate/nan
155155
schedule:
156156
interval: daily
157157

158158
- package-ecosystem: npm
159-
directory: /async_work_promise/napi
159+
directory: /src/5-async-work/async_pi_estimate/node-addon-api
160160
schedule:
161161
interval: daily
162162

163163
- package-ecosystem: npm
164-
directory: /async_work_promise/node-addon-api
164+
directory: /src/5-async-work/async_work_promise/napi
165165
schedule:
166166
interval: daily
167167

168168
- package-ecosystem: npm
169-
directory: /async_work_thread_safe_function/napi
169+
directory: /src/5-async-work/async_work_promise/node-addon-api
170170
schedule:
171171
interval: daily
172172

173173
- package-ecosystem: npm
174-
directory: /build_with_cmake/napi
174+
directory: /src/5-async-work/async_work_thread_safe_function/napi
175175
schedule:
176176
interval: daily
177177

178178
- package-ecosystem: npm
179-
directory: /build_with_cmake/node-addon-api
179+
directory: /src/8-tooling/build_with_cmake/napi
180180
schedule:
181181
interval: daily
182182

183183
- package-ecosystem: npm
184-
directory: /call-js-from-async-worker-execute/node-addon-api
184+
directory: /src/8-tooling/build_with_cmake/node-addon-api
185185
schedule:
186186
interval: daily
187187

188188
- package-ecosystem: npm
189-
directory: /emit_event_from_cpp/node-addon-api
189+
directory: /src/5-async-work/call-js-from-async-worker-execute/node-addon-api
190190
schedule:
191191
interval: daily
192192

193193
- package-ecosystem: npm
194-
directory: /function-reference-demo/node-addon-api
194+
directory: /src/7-events/emit_event_from_cpp/node-addon-api
195195
schedule:
196196
interval: daily
197197

198198
- package-ecosystem: npm
199-
directory: /inherits_from_event_emitter/node-addon-api
199+
directory: /src/4-references-and-handle-scope/function-reference-demo/node-addon-api
200200
schedule:
201201
interval: daily
202202

203203
- package-ecosystem: npm
204-
directory: /multiple_load/napi
204+
directory: /src/7-events/inherits_from_event_emitter/node-addon-api
205205
schedule:
206206
interval: daily
207207

208208
- package-ecosystem: npm
209-
directory: /multiple_load/node_10
209+
directory: /src/3-context-awareness/napi
210210
schedule:
211211
interval: daily
212212

213213
- package-ecosystem: npm
214-
directory: /napi-asyncworker-example/node-addon-api
214+
directory: /src/3-context-awareness/node_10
215215
schedule:
216216
interval: daily
217217

218218
- package-ecosystem: npm
219-
directory: /object-template-demo/nan
219+
directory: /src/5-async-work/napi-asyncworker-example/node-addon-api
220220
schedule:
221221
interval: daily
222222

223223
- package-ecosystem: npm
224-
directory: /object-template-demo/napi
224+
directory: /src/2-js-to-native-conversion/object-template-demo/nan
225225
schedule:
226226
interval: daily
227227

228228
- package-ecosystem: npm
229-
directory: /object-wrap-demo/node-addon-api
229+
directory: /src/2-js-to-native-conversion/object-template-demo/napi
230230
schedule:
231231
interval: daily
232232

233233
- package-ecosystem: npm
234-
directory: /
234+
directory: /src/2-js-to-native-conversion/object-wrap-demo/node-addon-api
235235
schedule:
236236
interval: daily
237237

238238
- package-ecosystem: npm
239-
directory: /promise-callback-demo/node-addon-api
239+
directory: /src/6-threadsafe-function/promise-callback-demo/node-addon-api
240240
schedule:
241241
interval: daily
242242

243243
- package-ecosystem: npm
244-
directory: /thread_safe_function_counting/node-addon-api
244+
directory: /src/6-threadsafe-function/thread_safe_function_counting/node-addon-api
245245
schedule:
246246
interval: daily
247247

248248
- package-ecosystem: npm
249-
directory: /thread_safe_function_round_trip/napi
249+
directory: /src/6-threadsafe-function/thread_safe_function_round_trip/napi
250250
schedule:
251251
interval: daily
252252

253253
- package-ecosystem: npm
254-
directory: /threadsafe-async-iterator/node-addon-api
254+
directory: /src/6-threadsafe-function/threadsafe-async-iterator/node-addon-api
255255
schedule:
256256
interval: daily
257257

258258
- package-ecosystem: npm
259-
directory: /typed_array_to_native/node-addon-api
259+
directory: /src/2-js-to-native-conversion/typed_array_to_native/node-addon-api
260260
schedule:
261261
interval: daily
262262

263263
- package-ecosystem: npm
264-
directory: /typed_threadsafe_function/node-addon-api
264+
directory: /src/6-threadsafe-function/typed_threadsafe_function/node-addon-api
265265
schedule:
266266
interval: daily
267267

268268
- package-ecosystem: npm
269-
directory: /typescript_with_addon/node-addon-api
269+
directory: /src/8-tooling/typescript_with_addon/node-addon-api
270270
schedule:
271271
interval: daily
272272

src/8-tooling/typescript_with_addon/node-addon-api/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
### Build and run:
44

55
```
6-
npm install
6+
npm install
77
npm test
88
```
99

@@ -16,4 +16,4 @@ This is a C++ function.
1616
This is a C function.
1717
```
1818

19-
This is using cmake and cmake-js based on the example [build_with_cmake](../build_with_cmake)
19+
This is using cmake and cmake-js based on the example [build_with_cmake](../../build_with_cmake)

website/README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ The website is generated by [Gatsby](https://www.gatsbyjs.org) and published to
1010

1111
The basic objective of this site is to publish additional useful information concerning the Node-API technology that extends beyond the basic documentation.
1212

13-
Ideally, pages published to this site should reference a working demo module that is also stored in this same repository. Features configured into the Gatsby project make embedding example source code fairly straightforward.
13+
Ideally, pages published to this site should reference a working demo module that is also stored in this same repository. Features configured into the Gatsby project make embedding example source code fairly straightforward.
1414

1515
## Contributing
1616

17-
Submissions are gratefully accepted. Simply fork the [node-addon-examples](https://github.com/nodejs/node-addon-examples) repository containing this directory, make your changes, and submit a PR.
17+
Submissions are gratefully accepted. Simply fork the [node-addon-examples](https://github.com/nodejs/node-addon-examples) repository containing this directory, make your changes, and submit a PR.
1818

1919
All of the site's content is located in the `docs` directory. Besides the Markdown files, there is also the `toc.json` file that needs to be updated when pages are added or removed.
2020

@@ -29,11 +29,11 @@ Each of the Markdown files includes front matter that Gatsby uses when formattin
2929
| `prev` | The `id` of the page to be shown as the Previous link at the bottom of the page. |
3030
| `next` | The `id` of the page to be shown as the Next link at the bottom of the page. |
3131

32-
The `prev` and `next` links can be omitted for the first and last pages in the set, respectively.
32+
The `prev` and `next` links can be omitted for the first and last pages in the set, respectively.
3333

3434
### Gatsby Basics
3535

36-
This project assumes that Gatsby is installed globally.
36+
This project assumes that Gatsby is installed globally.
3737

3838
```
3939
npm install -g gatsby-cli
@@ -56,17 +56,17 @@ These commands are useful while working on the site:
5656

5757
### Embedding Source Code Samples
5858

59-
For this project, Gatsby is configured to have the ability to copy example source code into the generated web pages. The advantage of this approach is that the web pages can be easily regenerated whenever the source code files change.
59+
For this project, Gatsby is configured to have the ability to copy example source code into the generated web pages. The advantage of this approach is that the web pages can be easily regenerated whenever the source code files change.
6060

6161
Here's the pattern to follow for embedding example source code:
6262

6363
```
64-
[**package.json**](https://github.com/nodejs/node-addon-examples/blob/HEAD/object-wrap-demo/node-addon-api/package.json)
64+
[**package.json**](https://github.com/nodejs/node-addon-examples/blob/HEAD/src/2-js-to-native-conversion/object-wrap-demo/node-addon-api/package.json)
6565
66-
`embed:object-wrap-demo/node-addon-api/package.json`
66+
`embed:src/2-js-to-native-conversion/object-wrap-demo/node-addon-api/package.json`
6767
```
6868

6969
> This snippet is taken from `website/docs/getting-started/objectwrap.md`
7070
71-
The path in the `embed` tag is relative to the main `node-addon-examples` directory, not the `website` directory.
71+
The path in the `embed` tag is relative to the main `node-addon-examples` directory, not the `website` directory.
7272

0 commit comments

Comments
 (0)