We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58e916e commit 5520a1bCopy full SHA for 5520a1b
gatsby-node.js
@@ -18,8 +18,15 @@ exports.sourceNodes = async (
18
pages.forEach((page) => {
19
const title = getNotionPageTitle(page)
20
const properties = getNotionPageProperties(page)
21
+ const frontmatter = Object.keys(properties).reduce(
22
+ (acc, key) => ({
23
+ ...acc,
24
+ [key]: properties[key].value,
25
+ }),
26
+ { title },
27
+ )
28
const markdown = "---\n"
- .concat(YAML.stringify({ title, ...properties }))
29
+ .concat(YAML.stringify(frontmatter))
30
.concat("\n---\n\n")
31
.concat(getNotionPageMD(page))
32
0 commit comments