gatsby-source-notion-churnotion 1.1.5 → 1.1.7
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/dist/onPostBootstrap.js +3 -6
- package/package.json +1 -1
package/dist/onPostBootstrap.js
CHANGED
@@ -54,7 +54,7 @@ const getRelatedPosts = (id, bow_vectors) => {
|
|
54
54
|
getMemorizedVectorSimilarity(vector_x, vector_node));
|
55
55
|
})
|
56
56
|
.map((x) => x[0])
|
57
|
-
.slice(0,
|
57
|
+
.slice(0, 6);
|
58
58
|
};
|
59
59
|
const getTextFromRawText = async (doc) => {
|
60
60
|
return doc
|
@@ -107,10 +107,7 @@ const onPostBootstrap = async ({ actions, getNode, getNodesByType, createNodeId,
|
|
107
107
|
.map((x) => (x === undefined ? 0 : x)));
|
108
108
|
});
|
109
109
|
nodes.forEach((node) => {
|
110
|
-
const
|
111
|
-
const related_nodes = related_node_ids
|
112
|
-
.map((id) => getNode(id))
|
113
|
-
.filter((relatedNode) => relatedNode !== undefined);
|
110
|
+
const relatedNodeIds = getRelatedPosts(node.id, bow_vectors);
|
114
111
|
const digest = `${node.id} - ${constants_1.NODE_TYPE.RelatedPost}`;
|
115
112
|
actions.createNode({
|
116
113
|
id: createNodeId(digest),
|
@@ -119,7 +116,7 @@ const onPostBootstrap = async ({ actions, getNode, getNodesByType, createNodeId,
|
|
119
116
|
type: constants_1.NODE_TYPE.RelatedPost,
|
120
117
|
contentDigest: digest,
|
121
118
|
},
|
122
|
-
posts:
|
119
|
+
posts: relatedNodeIds,
|
123
120
|
});
|
124
121
|
});
|
125
122
|
};
|
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.1.
|
4
|
+
"version": "1.1.7",
|
5
5
|
"skipLibCheck": true,
|
6
6
|
"license": "0BSD",
|
7
7
|
"main": "./dist/gatsby-node.js",
|