@sillsdev/docu-notion 0.13.1 → 0.13.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/plugins/internalLinks.spec.js +28 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,22 +38,22 @@ means that the id is "0456aa5842946PRETEND4f37c97a0e5".
|
|
|
38
38
|
Determine where you want the markdown files and images to land. The following works well for Docusaurus instances:
|
|
39
39
|
|
|
40
40
|
```
|
|
41
|
-
npx docu-notion -n secret_PRETEND123456789PRETEND123456789PRETEND6789 -r 0456aa5842946PRETEND4f37c97a0e5"
|
|
41
|
+
npx @sillsdev/docu-notion -n secret_PRETEND123456789PRETEND123456789PRETEND6789 -r 0456aa5842946PRETEND4f37c97a0e5"
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
Likely, you will want to store these codes in your environment variables and then use them like this:
|
|
45
45
|
|
|
46
46
|
```
|
|
47
47
|
(windows)
|
|
48
|
-
npx docu-notion -n %MY_NOTION_TOKEN% -r %MY_NOTION_DOCS_ROOT_PAGE_ID%
|
|
48
|
+
npx @sillsdev/docu-notion -n %MY_NOTION_TOKEN% -r %MY_NOTION_DOCS_ROOT_PAGE_ID%
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
```
|
|
52
52
|
(linux / mac)
|
|
53
|
-
npx docu-notion -n $MY_NOTION_TOKEN -r $MY_NOTION_DOCS_ROOT_PAGE_ID
|
|
53
|
+
npx @sillsdev/docu-notion -n $MY_NOTION_TOKEN -r $MY_NOTION_DOCS_ROOT_PAGE_ID
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
NOTE: In the above, we are using `npx` to use the latest `docu-notion`. A more conservative approach would be to `npm i cross-var docu-notion` and then create a script in your package.json like this:
|
|
56
|
+
NOTE: In the above, we are using `npx` to use the latest `docu-notion`. A more conservative approach would be to `npm i cross-var @sillsdev/docu-notion` and then create a script in your package.json like this:
|
|
57
57
|
|
|
58
58
|
```
|
|
59
59
|
"scripts": {
|
|
@@ -346,6 +346,34 @@ test("does not interfere with mailto links", () => __awaiter(void 0, void 0, voi
|
|
|
346
346
|
});
|
|
347
347
|
expect(results.trim()).toBe(`[mailme](mailto:foo@example.com)`);
|
|
348
348
|
}));
|
|
349
|
+
test("does not interfere with https links", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
350
|
+
const results = yield getMarkdown({
|
|
351
|
+
type: "paragraph",
|
|
352
|
+
paragraph: {
|
|
353
|
+
rich_text: [
|
|
354
|
+
{
|
|
355
|
+
type: "text",
|
|
356
|
+
text: {
|
|
357
|
+
content: "google",
|
|
358
|
+
link: { url: `https://www.google.com` },
|
|
359
|
+
},
|
|
360
|
+
annotations: {
|
|
361
|
+
bold: false,
|
|
362
|
+
italic: false,
|
|
363
|
+
strikethrough: false,
|
|
364
|
+
underline: false,
|
|
365
|
+
code: false,
|
|
366
|
+
color: "default",
|
|
367
|
+
},
|
|
368
|
+
plain_text: "google",
|
|
369
|
+
href: `https://www.google.com`,
|
|
370
|
+
},
|
|
371
|
+
],
|
|
372
|
+
color: "default",
|
|
373
|
+
},
|
|
374
|
+
});
|
|
375
|
+
expect(results.trim()).toBe(`[google](https://www.google.com)`);
|
|
376
|
+
}));
|
|
349
377
|
test("links to other notion pages that are not in this site give PROBLEM LINK", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
350
378
|
const results = yield getMarkdown({
|
|
351
379
|
type: "paragraph",
|
package/package.json
CHANGED