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
+47-1Lines changed: 47 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,8 @@ plugins: [
80
80
options: {
81
81
token:`$INTEGRATION_TOKEN`,
82
82
databaseId:`$DATABASE_ID`,
83
+
propsToFrontmatter:true,
84
+
lowerTitleLevel:true,
83
85
},
84
86
},
85
87
// ...
@@ -97,6 +99,14 @@ Integration token.
97
99
The identifier of the database you want to get pages from. The integration identified by provided
98
100
token must have access to the database with given id.
99
101
102
+
`propsToFrontmatter`[boolean][defaults to **true**]
103
+
104
+
Put Notion page props to Markdown frontmatter. If you set this to **false**, you will need to query `notion` to get page props.
105
+
106
+
`lowerTitleLevel`[boolean][defaults to **true**]
107
+
108
+
Push headings one level down. # becomes ##, ## becomes ###, ### becomes ####. Notion is limited to only 3 levels of heading. You can create ####, #####, etc. - they will not be reflected in Notion, but they will work properly in the Markdown output. Is **true** by default.
109
+
100
110
## How to query for nodes
101
111
102
112
You can query for pages with `notion` or grab all of them with `allNotion`. The raw content of the
@@ -114,7 +124,10 @@ query {
114
124
children
115
125
internal
116
126
title
117
-
properties
127
+
properties {
128
+
My_Prop_1
129
+
My_Prop_2
130
+
}
118
131
archived
119
132
createdAt
120
133
updatedAt
@@ -201,6 +214,39 @@ Untouched contents of whatever Notion API returned.
201
214
202
215
Markdown contents of the page. Limited by blocks currently supported by Notion API. Unsupported blocks turn into HTML comments specifying that Notion marked this block as non-supported.
203
216
217
+
## Attaching images via "Files" property
218
+
219
+
If you want to turn images attached through the "Files" property into file nodes that you can use with gatsby-image, you need to attach remote file nodes to the "Files" property. In the example below, the `propsToFrontmatter` is set to **true** and the **_Hero Image_** Files property is used for images:
0 commit comments