@@ -83,6 +83,13 @@ export default {
8383 // Optional: Output directory for generated client (overrides --output option)
8484 // outputDir: "./src/generated",
8585
86+ // Optional: Documentation generation options
87+ // docs: {
88+ // // NPM package name for the TypeScript client
89+ // // If provided, will add an NPM badge and link to the package
90+ // npmPackageName: "@my-org/my-solana-client",
91+ // },
92+
8693 // Optional: Add custom visitors to transform the Codama tree
8794 // Can be an array of visitors or a function that returns visitors
8895 // visitors: [
@@ -130,9 +137,12 @@ program
130137 const { codama, config } = await processIdls ( options ) ;
131138 const outputPath = resolve ( config . docsPath ?? "./docs" ) ;
132139
133- // Apply the markdown visitor
140+ // Apply the markdown visitor with options from config
134141 console . log ( `Generating documentation to ${ outputPath } ...` ) ;
135- codama . accept ( renderMarkdownVisitor ( outputPath ) ) ;
142+ const markdownOptions = {
143+ npmPackageName : config . docs ?. npmPackageName ,
144+ } ;
145+ codama . accept ( renderMarkdownVisitor ( outputPath , markdownOptions ) ) ;
136146
137147 console . log ( "✅ Documentation generated successfully!" ) ;
138148 } catch ( error ) {
0 commit comments