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
// if (page.type === PageType.DatabasePage) await processDatabasePage(page);
85
-
// if (page.type === PageType.Simple) await processSimplePage(page);
86
75
}
87
76
}
88
77
89
78
// This walks the "Outline" page and creates a list of all the nodes that will
90
79
// be in the sidebar, including the directories, the pages that are linked to
91
80
// that are parented in from the "Database", and any pages we find in the
92
-
// outline that contain content (which we call "Simple" pages).
93
-
// It does not generate any files. Later, we can
94
-
// then step through this list creating the directories and files we need, and,
95
-
// crucially, be able to figure out what the url will be for any links between
96
-
// content pages.
97
-
// FIX comment above: actually, the HierarchicalNamedLayoutStrategy does create directories.
81
+
// outline that contain content (which we call "Simple" pages). Later, we can
82
+
// then step through this list creating the files we need, and, crucially, be
83
+
// able to figure out what the url will be for any links between content pages.
98
84
asyncfunctiongetPagesRecursively(
99
85
incomingContext: string,
100
86
pageId: string,
@@ -117,10 +103,16 @@ async function getPagesRecursively(
117
103
}
118
104
if(!rootLevel&&pageInfo.hasParagraphs){
119
105
pages.push(pageInTheOutline);
120
-
if(pageInfo.linksPages)
106
+
107
+
// The best practice is to keep content pages in the "database" (kanban), but we do allow people to make pages in the outline directly.
108
+
// So how can we tell the difference between a page that is supposed to be content and one that is meant to form the sidebar? If it
109
+
// have just links, then it's a page for forming the sidebar. If it has contents and no links, then it's a content page. But what if
110
+
// it has both? Well then we assume it's a content page.
111
+
if(pageInfo.linksPages?.length){
121
112
warning(
122
-
`Ambiguity: The page "${pageInTheOutline.nameOrTitle}" is in the outline, has content, and also points at other pages. It will be treated as a simple content page.`
113
+
`Note: The page "${pageInTheOutline.nameOrTitle}" is in the outline, has content, and also points at other pages. It will be treated as a simple content page. This is no problem, unless you intended to have all your content pages in the database (kanban workflow) section.`
123
114
);
115
+
}
124
116
}
125
117
// a normal outline page that exists just to create the level, pointing at database pages that belong in this level
0 commit comments