|
| 1 | +# MCPulse Documentation |
| 2 | + |
| 3 | +This directory contains the source for the MCPulse documentation website, built with [Docusaurus](https://docusaurus.io/). |
| 4 | + |
| 5 | +## Development |
| 6 | + |
| 7 | +### Prerequisites |
| 8 | + |
| 9 | +- Node.js 18+ |
| 10 | +- npm or yarn |
| 11 | + |
| 12 | +### Installation |
| 13 | + |
| 14 | +```bash |
| 15 | +cd docs |
| 16 | +npm install |
| 17 | +``` |
| 18 | + |
| 19 | +### Local Development |
| 20 | + |
| 21 | +```bash |
| 22 | +npm start |
| 23 | +``` |
| 24 | + |
| 25 | +This command starts a local development server and opens a browser window. Most changes are reflected live without having to restart the server. |
| 26 | + |
| 27 | +### Build |
| 28 | + |
| 29 | +```bash |
| 30 | +npm run build |
| 31 | +``` |
| 32 | + |
| 33 | +This command generates static content into the `build` directory that can be served using any static hosting service. |
| 34 | + |
| 35 | +### Deployment |
| 36 | + |
| 37 | +The documentation is automatically deployed to GitHub Pages when changes are pushed to the `main` branch. |
| 38 | + |
| 39 | +Manual deployment: |
| 40 | + |
| 41 | +```bash |
| 42 | +npm run deploy |
| 43 | +``` |
| 44 | + |
| 45 | +## Structure |
| 46 | + |
| 47 | +``` |
| 48 | +docs/ |
| 49 | +├── docs/ # Documentation content |
| 50 | +│ ├── intro.md # Introduction page |
| 51 | +│ ├── installation.md # Installation guide |
| 52 | +│ ├── getting-started.md # Getting started guide |
| 53 | +│ ├── configuration.md # Configuration reference |
| 54 | +│ ├── architecture.md # Architecture overview |
| 55 | +│ ├── api/ # API reference |
| 56 | +│ │ └── rest-api.md |
| 57 | +│ ├── sdks/ # SDK documentation |
| 58 | +│ │ ├── overview.md |
| 59 | +│ │ └── python.md |
| 60 | +│ └── deployment/ # Deployment guides |
| 61 | +│ └── overview.md |
| 62 | +├── src/ # React components |
| 63 | +│ ├── css/ # Custom CSS |
| 64 | +│ │ └── custom.css |
| 65 | +│ └── pages/ # Custom pages |
| 66 | +│ ├── index.tsx # Homepage |
| 67 | +│ └── index.module.css |
| 68 | +├── static/ # Static files |
| 69 | +│ ├── img/ # Images |
| 70 | +│ └── CNAME # Custom domain config |
| 71 | +├── docusaurus.config.ts # Site configuration |
| 72 | +├── sidebars.ts # Sidebar navigation |
| 73 | +└── package.json # Dependencies |
| 74 | +
|
| 75 | +``` |
| 76 | + |
| 77 | +## Adding Documentation |
| 78 | + |
| 79 | +### New Page |
| 80 | + |
| 81 | +1. Create a Markdown file in `docs/`: |
| 82 | + ```bash |
| 83 | + touch docs/my-new-page.md |
| 84 | + ``` |
| 85 | + |
| 86 | +2. Add frontmatter: |
| 87 | + ```markdown |
| 88 | + --- |
| 89 | + sidebar_position: 5 |
| 90 | + --- |
| 91 | + |
| 92 | + # My New Page |
| 93 | + |
| 94 | + Content here... |
| 95 | + ``` |
| 96 | + |
| 97 | +3. The page will automatically appear in the sidebar. |
| 98 | + |
| 99 | +### New Section |
| 100 | + |
| 101 | +1. Create a directory: |
| 102 | + ```bash |
| 103 | + mkdir docs/my-section |
| 104 | + ``` |
| 105 | + |
| 106 | +2. Add an overview page: |
| 107 | + ```bash |
| 108 | + touch docs/my-section/overview.md |
| 109 | + ``` |
| 110 | + |
| 111 | +3. Update `sidebars.ts` to add the section. |
| 112 | + |
| 113 | +### Images |
| 114 | + |
| 115 | +Add images to `static/img/`: |
| 116 | + |
| 117 | +```markdown |
| 118 | + |
| 119 | +``` |
| 120 | + |
| 121 | +## Styling |
| 122 | + |
| 123 | +Custom styles are in `src/css/custom.css`. The theme uses: |
| 124 | + |
| 125 | +- **Primary Color**: Teal (#0d9488) |
| 126 | +- **Font**: Inter, system fonts |
| 127 | +- **Code Font**: JetBrains Mono, Fira Code |
| 128 | + |
| 129 | +## Components |
| 130 | + |
| 131 | +### Code Blocks |
| 132 | + |
| 133 | +```markdown |
| 134 | +\`\`\`python |
| 135 | +def hello(): |
| 136 | + print("Hello, world!") |
| 137 | +\`\`\` |
| 138 | +``` |
| 139 | + |
| 140 | +### Admonitions |
| 141 | + |
| 142 | +```markdown |
| 143 | +:::note |
| 144 | +This is a note |
| 145 | +::: |
| 146 | + |
| 147 | +:::tip |
| 148 | +This is a tip |
| 149 | +::: |
| 150 | + |
| 151 | +:::info |
| 152 | +This is info |
| 153 | +::: |
| 154 | + |
| 155 | +:::warning |
| 156 | +This is a warning |
| 157 | +::: |
| 158 | + |
| 159 | +:::danger |
| 160 | +This is danger |
| 161 | +::: |
| 162 | +``` |
| 163 | + |
| 164 | +### Tabs |
| 165 | + |
| 166 | +```markdown |
| 167 | +import Tabs from '@theme/Tabs'; |
| 168 | +import TabItem from '@theme/TabItem'; |
| 169 | + |
| 170 | +<Tabs> |
| 171 | + <TabItem value="python" label="Python"> |
| 172 | + Python code here |
| 173 | + </TabItem> |
| 174 | + <TabItem value="go" label="Go"> |
| 175 | + Go code here |
| 176 | + </TabItem> |
| 177 | +</Tabs> |
| 178 | +``` |
| 179 | + |
| 180 | +## Best Practices |
| 181 | + |
| 182 | +1. **Clear headings** - Use descriptive, hierarchical headings |
| 183 | +2. **Code examples** - Include working code examples |
| 184 | +3. **Screenshots** - Add screenshots for UI features |
| 185 | +4. **Links** - Use relative links for internal navigation |
| 186 | +5. **Versioning** - Update version numbers when APIs change |
| 187 | + |
| 188 | +## Deployment |
| 189 | + |
| 190 | +The site is deployed to GitHub Pages at `https://docs.mcpulse.io`. |
| 191 | + |
| 192 | +### GitHub Actions |
| 193 | + |
| 194 | +Deployment is automated via GitHub Actions. The workflow: |
| 195 | + |
| 196 | +1. Builds the documentation |
| 197 | +2. Deploys to `gh-pages` branch |
| 198 | +3. Available at the custom domain |
| 199 | + |
| 200 | +### Custom Domain |
| 201 | + |
| 202 | +Configure in `static/CNAME`: |
| 203 | +``` |
| 204 | +docs.mcpulse.io |
| 205 | +``` |
| 206 | + |
| 207 | +## Contributing |
| 208 | + |
| 209 | +Contributions are welcome! To contribute: |
| 210 | + |
| 211 | +1. Fork the repository |
| 212 | +2. Create a feature branch |
| 213 | +3. Make your changes |
| 214 | +4. Test locally with `npm start` |
| 215 | +5. Submit a pull request |
| 216 | + |
| 217 | +## Support |
| 218 | + |
| 219 | +- **Issues**: [GitHub Issues](https://github.com/sirrobot01/mcpulse/issues) |
| 220 | +- **Discussions**: [GitHub Discussions](https://github.com/sirrobot01/mcpulse/discussions) |
| 221 | + |
| 222 | +## License |
| 223 | + |
| 224 | +Same as the main MCPulse project - see [LICENSE](../LICENSE). |
0 commit comments