Modern, comprehensive documentation for the Socket.IO Plugin for Strapi v5, built with VitePress.
# Install dependencies
npm install
# Start dev server
npm run dev
# Opens at http://localhost:5173
# Build for production
npm run build
# Preview production build
npm run previewdocs/
├── index.md # Homepage
├── guide/
│ └── getting-started.md # Installation & setup guide
├── api/
│ ├── io-class.md # Core API reference
│ └── plugin-config.md # Configuration options
├── examples/
│ ├── index.md # Examples overview
│ ├── content-types.md # Content type examples
│ ├── events.md # Custom events examples
│ └── hooks.md # Lifecycle hooks examples
├── public/
│ └── logo.svg # Plugin logo
└── .vitepress/
└── config.js # VitePress configuration
- 🎨 Modern Design - Clean, professional UI with dark mode
- 🔍 Local Search - Fast, client-side search
- 📱 Mobile Responsive - Works on all devices
- 💻 Code Highlighting - Syntax highlighting for 40+ languages
- 🔗 Cross-References - Easy navigation between related topics
- 📖 Rich Content - Tips, warnings, code tabs, and more
- ⚡ Fast - Static site generation for optimal performance
- Requirements & compatibility
- Installation instructions
- Basic & advanced configuration
- Authentication strategies
- Admin panel setup
- Troubleshooting
- IO Class: Complete API with 7 helper functions
- Plugin Config: All configuration options with examples
- Content Types: Automatic real-time events
- Events: Custom event handlers
- Hooks: Lifecycle hooks & adapters
- Use Cases: 8 real-world implementations
- Frameworks: React, Vue, Next.js examples
- VitePress: v1.6.4
- Vue: v3.5.13
- Node: 18.0.0 - 22.x
```javascript
const socket = io('http://localhost:1337');
```::: tip
This is a helpful tip!
:::
::: warning
This is a warning!
:::
::: danger
This is dangerous!
:::::: code-group
```javascript [JavaScript]
const socket = io();
```
```typescript [TypeScript]
const socket: Socket = io();
```
:::Edit .vitepress/config.js to customize:
- Site title & description
- Navigation & sidebar
- Social links
- Theme colors
- Search settings
- Footer content
The documentation uses VitePress's default theme with custom branding:
- Primary Color:
#4945ff(Strapi blue) - Dark Mode: Automatic based on system preference
- Fonts: System fonts for optimal performance
npm run buildGenerates static files in .vitepress/dist/:
- Optimized HTML files
- Minified CSS & JavaScript
- Pre-rendered Vue components
- Service worker for offline support
# Build command
npm run build
# Publish directory
.vitepress/dist# Build command
npm run build
# Output directory
.vitepress/dist# .github/workflows/deploy.yml
name: Deploy docs
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install
- run: npm run build
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .vitepress/dist- Create markdown file in appropriate directory
- Add to
.vitepress/config.jssidebar - Link from relevant pages
- Test locally with
npm run dev
- Keep code examples up-to-date
- Add practical use cases
- Include TypeScript examples
- Provide error handling examples
- Add troubleshooting tips
- Use present tense
- Keep sentences short
- Include code examples
- Add visual breaks (headings, lists)
- Link to related content
- Test all code examples
MIT License - Same as the plugin
Original Plugin Authors:
Documentation:
- Updated and enhanced by @Schero94
Will be maintained till December 2026 🚀
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: strapi-plugin-io.netlify.app
Last Updated: November 27, 2025
VitePress Version: 1.6.4
Plugin Version: 3.0.0