|
| 1 | + |
| 2 | + |
| 3 | + # How to Use the "Populate External Docs" Command in VSCode Extension |
| 4 | + |
| 5 | +## Step 1: Install and Set Up the Extension |
| 6 | + |
| 7 | +Ensure you have the Dev-Docs VSCode extension installed and properly configured. |
| 8 | + |
| 9 | +## Step 2: Locate the Command |
| 10 | + |
| 11 | +1. Open the Command Palette in VSCode (Cmd+Shift+P on Mac or Ctrl+Shift+P on Windows/Linux). |
| 12 | +2. Type "Dev-Docs: Generate External Docs" to find the command. |
| 13 | + |
| 14 | +## Step 3: Run the Command |
| 15 | + |
| 16 | +Execute the command by selecting it from the Command Palette. |
| 17 | + |
| 18 | +## Step 4: Customize Generation with dev-docs.json |
| 19 | + |
| 20 | +To customize the generation process, you need to modify the `dev-docs.json` file in your project root. |
| 21 | + |
| 22 | +1. Open `dev-docs.json` in your project. |
| 23 | +2. Look for the `ai` section, which controls the AI-based documentation generation. |
| 24 | + |
| 25 | +Example structure: |
| 26 | + |
| 27 | +```json |
| 28 | +{ |
| 29 | + "ai": { |
| 30 | + "externalDocPrompt": "Custom prompt for external documentation", |
| 31 | + "docPath": "docs", |
| 32 | + "branch": "main", |
| 33 | + "merge": true, |
| 34 | + "components": { |
| 35 | + "template": "path/to/component/template.md" |
| 36 | + } |
| 37 | + } |
| 38 | +} |
| 39 | +``` |
| 40 | + |
| 41 | +## Key Customization Options |
| 42 | + |
| 43 | +1. `externalDocPrompt`: Customize the AI prompt for generating external docs. |
| 44 | +2. `docPath`: Specify the directory where external docs will be saved. |
| 45 | +3. `branch`: Set the Git branch for committing generated docs. |
| 46 | +4. `merge`: Enable/disable merging of documentation for multiple symbols in a file. |
| 47 | +5. `components`: Define custom MDX components for documentation. |
| 48 | + |
| 49 | +## Step 5: Generate Documentation |
| 50 | + |
| 51 | +After customizing `dev-docs.json`, run the "Populate External Docs" command again. The extension will use your settings to generate and save the documentation to a branch of your documentation repo tied to Dev-Docs. |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
0 commit comments