File tree Expand file tree Collapse file tree 4 files changed +17
-13
lines changed Expand file tree Collapse file tree 4 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,10 @@ export class BlockRenderer {
115
115
const db = await this . deferredRenderer . renderDatabasePages ( block . id ) ;
116
116
const msg = `<!-- included database ${ block . id } -->\n` ;
117
117
118
+ if ( db . config . skipMarkdownTable ) {
119
+ return msg ;
120
+ }
121
+
118
122
// todo: make this nicer, e.g. render multi tables
119
123
return msg + this . renderTables ( db ) ;
120
124
Original file line number Diff line number Diff line change @@ -35,9 +35,7 @@ export class PageRenderer {
35
35
if ( ! category ) {
36
36
this . throwMissingRequiredProperty ( "category" , page ) ;
37
37
}
38
-
39
- debug ( props ) ;
40
-
38
+
41
39
const nameSlug = slugify ( name ) ;
42
40
const categorySlug = slugify ( category ) ;
43
41
Original file line number Diff line number Diff line change @@ -42,9 +42,10 @@ export class PropertiesParser {
42
42
return value . multi_select . map ( ( x ) => x . name ) ;
43
43
case "date" :
44
44
return value . date ;
45
+ case "relation" :
46
+ return value . relation . map ( ( x ) => x . id ) ;
45
47
case "formula" :
46
48
case "rollup" :
47
- case "relation" :
48
49
case "people" :
49
50
case "files" :
50
51
case "checkbox" :
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ export interface SyncConfig {
4
4
/**
5
5
* Id of the Notion database containing the CMS content.
6
6
* Traversing the block graph starts here.
7
- *
7
+ *
8
8
* By convention this database must have the following properties
9
- *
9
+ *
10
10
* - Name: page name
11
11
* - Category: page category
12
12
* - sort: number to control sorting of pages in sidebar
@@ -15,14 +15,14 @@ export interface SyncConfig {
15
15
16
16
/**
17
17
* The output directory where the sync will place pages.
18
- *
18
+ *
19
19
* Example: "docs/"
20
20
*/
21
21
outDir : string ;
22
22
23
23
/**
24
24
* The path where the sync will store an index of rendered pages and their properties.
25
- * The index is
25
+ * The index is
26
26
*/
27
27
indexPath : string ;
28
28
@@ -36,7 +36,7 @@ export interface SyncConfig {
36
36
export interface DatabaseConfig {
37
37
/**
38
38
* The output directory where the sync will place pages of this database.
39
- *
39
+ *
40
40
* Example: docs/mydb"
41
41
*/
42
42
outDir : string ;
@@ -46,18 +46,19 @@ export interface DatabaseConfig {
46
46
*/
47
47
sorts ?: Sort [ ] ;
48
48
49
+ skipMarkdownTable ?: boolean ;
50
+
49
51
/**
50
52
* Configuration options for Notion API page properties
51
53
*/
52
54
properties : {
53
55
/**
54
- * The Notion API page property that provides the value to use for the markdown page category.
55
- * This will be prefixed by DatabaseConfig.pageCategoryValuePrefix
56
- *
56
+ * The Notion API page property that provides an optional sub-category value to use for the markdown page category.
57
+ *
57
58
* Example: "Cluster"
58
59
*/
59
60
category : string ;
60
-
61
+
61
62
/**
62
63
* A whitelist of Notion API page property names to include in the markdown page properties.
63
64
* Use this to select properties for export and control their ordering in rendered tables.
You can’t perform that action at this time.
0 commit comments