This directory contains the VitePress documentation for the NDArray PHP library.
docs/
├── .vitepress/ # VitePress configuration
│ └── config.ts # Site configuration
├── guide/ # User guides
│ ├── getting-started/# Installation, quick start, migration
│ ├── fundamentals/ # Arrays, data types, indexing, views
│ └── operations/ # Creation, arithmetic, math, reductions
├── api/ # API Reference
├── examples/ # Cookbook examples
├── public/ # Static assets (logo, etc.)
└── index.md # Home page
npm installnpm run docs:devThe documentation will be available at http://localhost:5173
npm run docs:buildOutput will be in docs/.vitepress/dist/
npm run docs:preview- Create a new
.mdfile in the appropriate directory - Add the page to the sidebar in
.vitepress/config.ts - Follow the existing style and formatting
- Document methods with clear signatures
- Include parameter descriptions
- Provide practical examples
- Link to related methods
- Use clear, concise language
- Include code examples for all features
- Use admonitions (::: tip, ::: warning) for important notes
- Follow PHP naming conventions in examples
- Show expected output where helpful
The documentation is automatically deployed to GitHub Pages when pushing to the main branch.
When adding new features to the library, please also update the documentation:
- Update relevant guide pages
- Add API documentation
- Include examples showing the new feature
- Update the changelog