gatsby-source-notion-churnotion 1.0.26 → 1.0.27

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,7 +16,7 @@ const getPages = async ({ databaseId, reporter, getCache, actions, createNode, c
16
16
  * @param databaseId 데이터베이스 아이디
17
17
  * @param parentCategoryId 부모 데이터베이스 아이디
18
18
  */
19
- const processDatabase = async (databaseId, parentCategoryId = null, categoryPath = [], tagMap = {}, categoryUrl = ``) => {
19
+ const processDatabase = async (databaseId, parentCategoryId = null, categoryPath = [], tagMap = {}, parentCategoryUrl = ``) => {
20
20
  let hasMore = true;
21
21
  try {
22
22
  while (hasMore) {
@@ -39,7 +39,7 @@ const getPages = async ({ databaseId, reporter, getCache, actions, createNode, c
39
39
  reporter.warn(`[WARNING] Category without a title detected: ${categoryJsonData.id}`);
40
40
  }
41
41
  const nodeId = createNodeId(`${categoryJsonData.id}-category`);
42
- categoryUrl += `/${slug}`;
42
+ const categoryUrl = `${parentCategoryUrl}/${slug}`;
43
43
  const categoryNode = {
44
44
  id: nodeId,
45
45
  category_name: title,
@@ -156,7 +156,7 @@ const getPages = async ({ databaseId, reporter, getCache, actions, createNode, c
156
156
  },
157
157
  tags: tagIds,
158
158
  parent: null,
159
- url: `${constants_1.COMMON_URI}/${constants_1.POST_URI}${categoryUrl}/${slug}`,
159
+ url: `${constants_1.COMMON_URI}/${constants_1.POST_URI}${parentCategoryUrl}/${slug}`,
160
160
  thumbnail: imageNode,
161
161
  };
162
162
  await createNode(postNode);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gatsby-source-notion-churnotion",
3
3
  "description": "Gatsby plugin that can connect with One Notion Database RECURSIVELY using official API",
4
- "version": "1.0.26",
4
+ "version": "1.0.27",
5
5
  "skipLibCheck": true,
6
6
  "license": "0BSD",
7
7
  "main": "./dist/gatsby-node.js",