gatsby-source-notion-churnotion 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -72,7 +72,11 @@ const getPages = async ({ databaseId, reporter, getCache, actions, createNode, c
72
72
  else {
73
73
  // 페이지인 경우
74
74
  const title = page.properties?.[`이름`]?.title?.[0]?.plain_text || `Unnamed`;
75
- const slug = (0, slugify_1.slugify)(title);
75
+ const slug = (0, slugify_1.slugify)(page.properties?.[`slug`]?.rich_text?.plain_text ||
76
+ crypto_1.default
77
+ .createHash(`md5`)
78
+ .update(JSON.stringify(title))
79
+ .digest(`hex`));
76
80
  if (!title) {
77
81
  reporter.warn(`[WARNING] Category without a title detected: ${page.id}`);
78
82
  }
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.1",
4
+ "version": "1.0.3",
5
5
  "skipLibCheck": true,
6
6
  "license": "0BSD",
7
7
  "main": "./dist/gatsby-node.js",