Commit e64f3e9 1 parent 078cac0 commit e64f3e9 Copy full SHA for e64f3e9
File tree 1 file changed +22
-1
lines changed
1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -140,10 +140,31 @@ export async function serveProject(
140
140
throw new Error ( `${ target } is not a project` ) ;
141
141
}
142
142
143
+ format ?: string | Record < string , unknown > | unknown ,
144
+ ) => {
145
+ if ( ! format ) {
146
+ return false ;
147
+ }
148
+
149
+ if ( typeof format === "string" ) {
150
+ return format === "docusaurus-md" ;
151
+ } else if ( typeof format === "object" ) {
152
+ const formats = Object . keys ( format ) ;
153
+ if ( formats . length > 0 ) {
154
+ const firstFormat = Object . keys ( format ) [ 0 ] ;
155
+ return firstFormat === "docusaurus-md" ;
156
+ } else {
157
+ return false ;
158
+ }
159
+ } else {
160
+ return false ;
161
+ }
162
+ } ;
163
+
143
164
// Default project types can't be served
144
165
const projType = projectType ( project ?. config ?. project ?. [ kProjectType ] ) ;
145
166
if (
146
- projType . type === "default" && project ?. config ?. format !== "docusaurus-md"
167
+ projType . type === "default" && ! isDocusaurusMd ( project ?. config ?. format )
147
168
) {
148
169
const hasIndex = project . files . input . some ( ( file ) => {
149
170
let relPath = file ;
You can’t perform that action at this time.
0 commit comments