@@ -67,15 +67,17 @@ target_compile_features(${sourceBasename} PRIVATE cxx_std_23)
6767 // Run mrdocs to generate documentation
6868 const mrdocsConfig = path . join ( absSnippetsDir , 'mrdocs.yml' )
6969 const mrdocsInput = cmakeListsPath
70- const mrdocsOutput = path . join ( absSnippetsDir , 'output' )
70+ const mrdocsOutput = path . join ( absSnippetsDir , 'output' , 'reference.html' )
7171 const args = [
7272 mrdocsExecutable ,
7373 `--config=${ mrdocsConfig } ` ,
7474 mrdocsInput ,
7575 `--output=${ mrdocsOutput } ` ,
76- '--multipage=true ' ,
76+ '--multipage=false ' ,
7777 '--generator=html' ,
7878 '--embedded=true' ,
79+ '--show-namespaces=false' ,
80+ '--tagfile=' ,
7981 ] ;
8082 const command = args . join ( ' ' ) ;
8183 console . log ( `Running command: ${ command } ` )
@@ -87,22 +89,19 @@ target_compile_features(${sourceBasename} PRIVATE cxx_std_23)
8789 }
8890
8991 // Look load symbol page in the output directory
90- const documentationFilename = `${ sourceBasename } .html`
91- const documentationPath = path . join ( mrdocsOutput , documentationFilename )
92- if ( ! fs . existsSync ( documentationPath ) ) {
93- console . log ( `Documentation file ${ documentationFilename } not found in ${ mrdocsOutput } ` )
92+ if ( ! fs . existsSync ( mrdocsOutput ) ) {
93+ console . log ( `Documentation file not found in ${ mrdocsOutput } ` )
9494 console . log ( 'Failed to generate website panel documentation' )
9595 process . exit ( 1 )
9696 }
97- panel . documentation = fs . readFileSync ( documentationPath , 'utf8' ) ;
97+ panel . documentation = fs . readFileSync ( mrdocsOutput , 'utf8' ) ;
9898
9999 // Also inject the contents of the source file as highlighted C++
100100 const snippetContents = fs . readFileSync ( sourcePath , 'utf8' ) ;
101- const highlightedSnippet = hljs . highlight ( snippetContents , { language : 'cpp' } ) . value ;
102- panel . snippet = highlightedSnippet ;
101+ panel . snippet = hljs . highlight ( snippetContents , { language : 'cpp' } ) . value ;
103102
104103 // Delete these temporary files
105- fs . rmSync ( mrdocsOutput , { recursive : true } ) ;
104+ fs . unlinkSync ( mrdocsOutput ) ;
106105 fs . unlinkSync ( cmakeListsPath ) ;
107106
108107 console . log ( `Documentation generated successfully for panel ${ panel . source } ` )
0 commit comments