File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -448,8 +448,9 @@ class IndexPageManager {
448448 generateComponentCard ( component ) {
449449 // Generate install command - remove .md extension from path
450450 let componentPath = component . path || component . name ;
451- if ( componentPath . endsWith ( '.md' ) ) {
452- componentPath = componentPath . replace ( / \. m d $ / , '' ) ;
451+ // Remove .md or .json extensions from path
452+ if ( componentPath . endsWith ( '.md' ) || componentPath . endsWith ( '.json' ) ) {
453+ componentPath = componentPath . replace ( / \. ( m d | j s o n ) $ / , '' ) ;
453454 }
454455 if ( componentPath . endsWith ( '.json' ) ) {
455456 componentPath = componentPath . replace ( / \. j s o n $ / , '' ) ;
Original file line number Diff line number Diff line change @@ -1504,7 +1504,9 @@ function generateInstallCommand(component) {
15041504 } else if ( component . type === 'command' ) {
15051505 return `npx claude-code-templates@latest --command=${ component . name } --yes` ;
15061506 } else if ( component . type === 'mcp' ) {
1507- return `npx claude-code-templates@latest --mcp=${ component . name } --yes` ;
1507+ // Remove .json extension from MCP names for the command
1508+ const mcpName = component . name . replace ( / \. j s o n $ / , '' ) ;
1509+ return `npx claude-code-templates@latest --mcp=${ mcpName } --yes` ;
15081510 }
15091511 return `npx claude-code-templates@latest` ;
15101512}
You can’t perform that action at this time.
0 commit comments