A minimal, server-side rendered blog framework built with PHP, Markdown, and YAML. Zero JavaScript required, lightning fast, and developer-friendly.
- Works 100% without JavaScript enabled
- Server-side rendered HTML
- Progressive enhancement ready
- Perfect for accessibility
- PHP 8.3 + nginx + OPcache - Maximum speed
- Gzip compression enabled
- Aggressive caching headers
- ~50ms response times
- VS Code dark theme aesthetic
- Mobile responsive design
- Clean typography and spacing
- Accessible markup
- Markdown-based posts and notes
- YAML frontmatter for metadata
- File-based - no database required
- Version control friendly
- Hot reload in development
- Docker setup included
- One-command deployment
- Extensible architecture
-
Clone the framework:
git clone https://github.com/yourusername/phpmark-framework cd phpmark-framework -
Customize your site:
# Edit site configuration nano includes/config.php -
Start development:
./dev.sh # Visit http://localhost:3000 -
Deploy to production:
docker-compose up -d
That's it! Your blog is live. 🎉
phpmark-framework/
├── includes/
│ ├── config.php # Site configuration
│ └── functions.php # Core framework functions
├── pages/
│ ├── home.php # Homepage
│ ├── blog.php # Blog index
│ ├── blog-post.php # Individual blog posts
│ ├── notes.php # Notes index
│ ├── note.php # Individual notes
│ ├── about.php # About page
│ └── portfolio.php # Portfolio page
├── templates/
│ └── layout.php # Main HTML template
├── data/
│ ├── posts/ # Blog posts (.md files)
│ ├── notes/ # Technical notes (.md files)
│ └── pages/ # Static content (.md, .yaml)
├── public/ # Static assets
├── docker/ # Docker configurations
└── index.php # Main router
Create .md files in data/posts/:
---
title: "My First Post"
publishDate: "2024-01-15"
excerpt: "A brief description of the post"
tags: ["php", "blog", "framework"]
readingTime: "5"
---
# My First Post
Write your content here in **Markdown**!
## Features
- Easy to write
- Beautiful output
- Fast rendering
```php
echo "Code blocks work too!";
### Notes
Create `.md` files in `data/notes/`:
```markdown
---
title: "Quick Note"
date: "2024-01-15"
excerpt: "A helpful note about something"
---
# Quick Note
Perfect for documentation, tutorials, or quick references.
Edit data/pages/about.md and data/pages/portfolio.yaml to customize your about and portfolio pages.
Edit includes/config.php to customize:
// Site settings
define('SITE_NAME', 'Your Site Name');
define('SITE_TAGLINE', 'your_site_tagline');
define('SITE_DESCRIPTION', 'Your site description');
define('SITE_URL', 'https://yoursite.com');
// Author info
define('SITE_AUTHOR', 'Your Name');
define('SITE_EMAIL', 'your@email.com');
define('SITE_LINKEDIN', 'linkedin.com/in/yourprofile');
define('SITE_GITHUB', 'github.com/yourusername');
// Theme colors (VS Code Dark by default)
define('COLOR_PRIMARY', '#58a6ff');
define('COLOR_SECONDARY', '#7c3aed');
// Enable/disable sections
define('ENABLE_BLOG', true);
define('ENABLE_NOTES', true);
define('ENABLE_PORTFOLIO', true);
define('ENABLE_ABOUT', true);# Quick start
./dev.sh
# Or manual
docker-compose -f docker-compose.dev.yml up --build -dDevelopment features:
- Hot reload enabled
- No caching for instant updates
- Error display enabled
- OPcache with 2s revalidation
docker-compose up -dProduction features:
- Optimized OPcache settings
- Gzip compression enabled
- Aggressive HTTP caching
- Error logging (no display)
Edit the CSS in templates/layout.php. The framework uses inline styles for simplicity and performance.
- Create a new PHP file in
pages/ - Add the route in
index.php - Add navigation link in
templates/layout.php
The DataLoader class in includes/functions.php handles content loading. Extend it to add new content types or data sources.
PHPMark Framework is optimized for speed:
- HTML Generation: ~5-10ms
- Total Response: ~50ms
- Memory Usage: ~20MB container
- Zero JS: Instant page display
- Gzip: ~70% size reduction
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - feel free to use PHPMark Framework for any project!
Built with ❤️ by developers who believe in simple, fast, and accessible web technologies.
PHPMark Framework - Simple. Fast. Elegant.
