The official documentation website for Newtron, built with Newtron.
Newtron is a PHP framework built around one core principle: complex features should require embarrassingly simple code. It's built to solve real developer pain points by making common, complex tasks trivially simple.
This repository contains the source files for Newtron's documentation website, including:
- Getting Started guides
- Core documentation
- Tutorials and examples
- Architecture explanations
The official documentation website for Newtron - a PHP framework built around the principle of "complex features with embarrassingly simple code."
Live site: newtron.dev (update with actual URL)
This repository contains the source files for Newtron's documentation website, including:
- Getting Started guides
- Complete API documentation
- Tutorials and examples
- Architecture explanations
- Contribution guidelines
- PHP 8.3+
- Composer
- Git
# Clone the repository
git clone https://github.com/newtron-framework/newtron-docs.git
cd newtron-docs
# Install dependencies
composer install
# Start development server
cd public && php -S localhost:8000The site will be available at http://localhost:8000.
The documentation is made up of Markdown files in the docs/ directory, and the file paths within docs/ are used for the URL.
The sidebar menu is defined in app/SidebarStructure.php.
Any contributions to improve the documentation are welcome! Here's how:
- Click "Edit this page" at the bottom of any documentation page
- Make your changes
- Submit a pull request
- Fork this repository
- Create a new branch:
git checkout -b docs/my-improvement - Make your changes following our style guide
- Test locally
- Submit a pull request with a clear description
Found a problem? Open an issue with:
- What's wrong or unclear
- Which page it's on
- Suggestions for improvement (if any)
- Be conversational: Write like you're explaining to a friend
- Be practical: Focus on real use cases, not abstract concepts
- Be concise: Respect the reader's time
- Show and explain: Use code examples liberally, but be sure to explain deeper concepts
- Be honest: If something is coming later, say so
- Include complete, working examples
- Use realistic variable names and scenarios
- Add comments for clarity, but don't over-comment
- Show both simple and advanced usage when relevant
// Good - complete and practical
$form = Form::new()
->field('email')->required()->email()
->field('password')->required()->min(8);
if ($form->submitted() && $form->valid()) {
Auth::login($form->data());
}
// Bad - too abstract
$x = SomeClass::create($y);
if ($x->check()) {
$x->process();
}- Use H1 (
#) for page title only - Use H2 (
##) for main sections - Use H3 (
###) for subsections - Use code blocks with language specified:
```php - Use inline code for: commands, file paths, class names, method names
- Bold key, Newtron-specific concepts on first use
- Use lists for steps or collections of items
Every documentation page should include:
- Brief introduction: What this page covers
- Core content: Organized by topic/complexity
- Code examples: Practical, copy-paste ready
Avoid:
- "What's coming" sections (save for roadmap)
- "Best practices" sections (integrate into content)
- "Common patterns" dumps (show in context)
- General questions: GitHub Discussions
- Documentation issues: Open an issue