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: README.md
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,23 @@
1
-
# notion-pull
1
+
# notion-pull-mdx
2
2
3
-
notion-pull lets you use Notion as your editor for markdown-based static site generators like [Docusaurus](https://docusaurus.io/). Using Notion instead of raw markdown files means that you don't have to teach non-developers how to make git commits and pull requests. It also allows you to leverage Notion's database tools to control workflow, Notion's commenting feature to discuss changes, etc.
3
+
notion-pull-mdx lets you use Notion as your editor for markdown-based static site generators like [Docusaurus](https://docusaurus.io/). Using Notion instead of raw markdown files means that you don't have to teach non-developers how to make git commits and pull requests. It also allows you to leverage Notion's database tools to control workflow, Notion's commenting feature to discuss changes, etc.
4
4
5
-
Example Site: https://sillsdev.github.io/notion-pull-sample-site/
5
+
Example Site: https://sillsdev.github.io/notion-pull-mdx-sample-site/
6
6
7
7
# Instructions
8
8
9
9
## 1. Set up your documentation site.
10
10
11
-
First, prepare your markdown-based static file system like [Docusaurus](https://docusaurus.io/). For a shortcut with github actions, search, and deployment to github pages, you can just copy [this template](https://github.com/sillsdev/notion-pull-sample-site).
11
+
First, prepare your markdown-based static file system like [Docusaurus](https://docusaurus.io/). For a shortcut with github actions, search, and deployment to github pages, you can just copy [this template](https://github.com/sillsdev/notion-pull-mdx-sample-site).
12
12
13
-
## 2. In Notion, duplicate the notion-pull template
13
+
## 2. In Notion, duplicate the notion-pull-mdx template
14
14
15
15
Go to [this template page](https://hattonjohn.notion.site/Documentation-Template-Docusaurus-0e998b32da3c47edad0f62a25b49818c). Duplicate it into your own workspace.
16
16
You can name it anything you like, e.g. "Documentation Root".
17
17
18
18
## 3. Create a Notion Integration
19
19
20
-
In order for notion-pull to read your site via Notion's API, you need to create what Notion calls an "integration". Follow [these instructions](https://developers.notion.com/docs/getting-started) to make an integration and get your token. Limit your integration to "READ" access.
20
+
In order for notion-pull-mdx to read your site via Notion's API, you need to create what Notion calls an "integration". Follow [these instructions](https://developers.notion.com/docs/getting-started) to make an integration and get your token. Limit your integration to "READ" access.
21
21
22
22
## 4. "Invite" your Notion Integration to read you page
23
23
@@ -27,7 +27,7 @@ In Notion, click "Share" on the root of your documentation and "invite" your int
27
27
28
28
## 5. Add your pages under your Outline page.
29
29
30
-
Currently, notion-pull expects that each page has only one of the following: subpages, links to other pages, or normal content. Do not mix them. You can add content pages directly here, but then you won't be able to make use of the workflow features. If those matter to you, instead make new pages under the "Database" and then link to them in your outline pages.
30
+
Currently, notion-pull-mdx expects that each page has only one of the following: subpages, links to other pages, or normal content. Do not mix them. You can add content pages directly here, but then you won't be able to make use of the workflow features. If those matter to you, instead make new pages under the "Database" and then link to them in your outline pages.
31
31
32
32
## 6. Pull your pages
33
33
@@ -38,24 +38,24 @@ 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:
Most projects should probably commit the current markdown and image files each time you run notion-pull.
58
+
Most projects should probably commit the current markdown and image files each time you run notion-pull-mdx.
59
59
60
60
Note that if you choose not to commit, the workflow feature (see below) won't work for you. Imagine the case where a document that previously had a `Status` property of `Publish` now has a different status. You probably want to keep publishing the old version until the new one is ready. But if you don't commit files, your CI system (e.g. Github Actions) won't have the old version around, so it will disappear from your site.
61
61
@@ -65,17 +65,17 @@ One of the big attractions of Notion for large documentation projects is that yo
notion-pull is not doing anything smart with regards to previously Published but now not Published documents. All it does is ignore every Notion document that doesn't have `status == Publish`. So if the old version of the document is still in your file tree when your static site generator (e.g. Docusaurus) runs, then it will appear on your website. If it isn't there, it won't. If you rename directories or move the document, notion-pull will not realize this and will delete the previously published markdown file.
74
+
notion-pull-mdx is not doing anything smart with regards to previously Published but now not Published documents. All it does is ignore every Notion document that doesn't have `status == Publish`. So if the old version of the document is still in your file tree when your static site generator (e.g. Docusaurus) runs, then it will appear on your website. If it isn't there, it won't. If you rename directories or move the document, notion-pull-mdx will not realize this and will delete the previously published markdown file.
75
75
76
76
Links from one document to another in Notion are not yet converted to local links.
77
77
78
-
Notion-pull makes some attempt to keep the right order of things, but there are definitely cases where it isn't smart enough yet.
78
+
notion-pull-mdx makes some attempt to keep the right order of things, but there are definitely cases where it isn't smart enough yet.
Copy file name to clipboardExpand all lines: src/NotionPage.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ const notionLimiter = new RateLimiter({
15
15
letnotionClient: Client;
16
16
17
17
// Notion has 2 kinds of pages: a normal one which is just content, and what I'm calling a "database page", which has whatever properties you put on it.
18
-
// notion-pull supports the later via links from outline pages. That is, you put the database pages in a database, then separately, in the outline, you
18
+
// notion-pull-mdx supports the later via links from outline pages. That is, you put the database pages in a database, then separately, in the outline, you
19
19
// create pages for each node of the outline and then add links from those to the database pages. In this way, we get the benefits of database
20
20
// pages (metadata, workflow, etc) and also normal pages (order, position in the outline).
`Skipping "${pageInTheOutline.nameOrTitle}" and its children. Notion-pull does not support pages that are both levels and have content at the same time.`
104
+
`Skipping "${pageInTheOutline.nameOrTitle}" and its children. notion-pull-mdx does not support pages that are both levels and have content at the same time.`
0 commit comments