A beautiful, secure, and modern flat-file CMS built with PHP featuring a comprehensive design system, dark mode support, and exceptional user experience.
- Comprehensive Design System: Cohesive warm brown/cream color palette with modern typography
- Dark Mode Support: Automatic system preference detection with manual toggle
- Responsive Design: Mobile-first approach with fluid layouts
- Smooth Animations: Subtle fade-in effects and hover interactions
- Component-Based Architecture: Reusable UI components for consistency
- Flat-File Storage: Posts stored as HTML files with YAML frontmatter
- WYSIWYG Editor: CKEditor 5 for rich content creation
- Session-Based Authentication: Secure admin login system
- SEO Optimized: Meta tags, structured data, XML sitemap, friendly URLs
- Categories & Tags: Organize content with flexible taxonomy
- Reading Progress Indicator: Visual progress bar for long posts
- Social Sharing: Built-in Twitter, Facebook, and copy-link sharing
- Breadcrumb Navigation: Easy site navigation
- Statistics Dashboard: Overview cards in admin panel
- Quick Actions: Streamlined workflow for content management
- CSRF Protection: Comprehensive cross-site request forgery prevention
- XSS Prevention: Input sanitization and output escaping
- Directory Traversal Protection: Secure slug sanitization
- HTTPS Enforcement: Automatic secure connection redirect
- Performance Optimized: Efficient CSS architecture and minimal dependencies
- WCAG 2.1 AA Compliant: Screen reader support and keyboard navigation
- Skip Links: Quick navigation for assistive technologies
- High Contrast Support: Enhanced visibility options
- Focus Management: Proper focus indicators and tab order
- ARIA Labels: Comprehensive accessibility markup
-
Prerequisites
PHP 7.4+ with file system permissions Web server (Apache/Nginx) with URL rewriting
-
Setup
# Clone or download the project git clone https://github.com/renggap/QiBlog.git cd QiBlog # Set permissions chmod 755 posts/ chmod 644 assets/css/*.css
-
Configuration
# Set admin password (recommended) export ADMIN_PASSWORD="your-secure-password" # Or for Apache, add to .htaccess: SetEnv ADMIN_PASSWORD "your-secure-password"
-
Launch
# Access your blog http://yourdomain.com/index.php # Admin panel http://yourdomain.com/admin/
- Navigate to
/admin/
or/admin/login.php
- Login with your configured password
- Default development password:
admin123
(β οΈ Change for production!)
- Create Posts: Use the "Create New Post" button in the admin dashboard
- Rich Editor: CKEditor 5 with full formatting capabilities
- Metadata: Add categories, tags, and custom excerpts
- Preview: Live preview functionality before publishing
- Dashboard Overview: Statistics cards showing post counts and recent activity
- Post Management: Card-based interface replacing traditional tables
- Quick Actions: Edit, view, and delete posts with intuitive controls
- Search & Filter: Advanced content organization tools
- Homepage: Modern card-based layout with hover effects
- Post View: Enhanced reading experience with progress indicator
- Navigation: Breadcrumb navigation and smooth scrolling
- Social Features: Built-in sharing and engagement tools
QiBlog/
βββ index.php # Enhanced homepage with modern design
βββ post.php # Redesigned post view with reading features
βββ sitemap.php # XML sitemap generator
βββ .htaccess # URL rewriting and security headers
β
βββ admin/ # Modernized admin panel
β βββ dashboard.php # Statistics dashboard with card layout
β βββ create.php # Enhanced post creation interface
β βββ edit.php # Improved post editing experience
β βββ login.php # Secure admin authentication
β βββ logout.php # Session management
β
βββ includes/ # Core PHP functionality
β βββ config.php # Site configuration and settings
β βββ functions.php # Core functions and utilities
β βββ auth.php # Authentication system
β βββ Parsedown.php # Markdown parsing (if needed)
β
βββ posts/ # Content storage
β βββ *.html # Post files with YAML frontmatter
β
βββ assets/ # Enhanced design system
βββ css/
β βββ style.css # Main stylesheet with legacy support
β β
β βββ core/ # Foundation files
β β βββ variables.css # Design tokens and CSS custom properties
β β βββ reset.css # Modern CSS reset
β β βββ typography.css # Typography system
β β
β βββ components/ # Reusable UI components
β β βββ buttons.css # Button variants and states
β β βββ cards.css # Card components and layouts
β β βββ navigation.css # Navigation and breadcrumbs
β β βββ forms.css # Form elements and inputs
β β
β βββ utilities/ # Utility classes
β β βββ animations.css # Animation and transition utilities
β β βββ responsive.css # Responsive design helpers
β β βββ accessibility.css # A11y enhancement utilities
β β
β βββ themes/ # Theme system
β βββ light.css # Light theme styles
β βββ dark.css # Dark theme styles
β
βββ js/ # JavaScript files
β βββ *.min.js # Minified JavaScript assets
β βββ *.js # Development scripts
β
βββ fonts/ # Web fonts
β βββ *.woff2 # Optimized font files
β
βββ images/ # Image assets
βββ *.jpg, *.png, *.svg # Optimized images
- Primary:
#8B6914
(Warm golden brown) - Accent:
#D4AF37
(Gold accent) - Background:
#F8F4E1
(Warm cream) - Text:
#543310
(Deep brown)
- Primary Font: Manrope (Google Fonts)
- Heading Font: Manrope with serif fallback
- Monospace: Fira Code for code blocks
- Buttons: Multiple variants (primary, secondary, accent, ghost)
- Cards: Post cards, admin cards, statistics cards
- Navigation: Responsive navigation with breadcrumbs
- Forms: Enhanced form elements with validation states
# Admin password (required for production)
ADMIN_PASSWORD="your-secure-password"
# Site configuration
SITE_TITLE="Your Blog Name"
SITE_URL="https://yourdomain.com"
TIMEZONE="Asia/Jakarta"
# Posts directory must be writable
chmod 755 posts/
# Assets should be readable
chmod 644 assets/css/*.css
chmod 644 assets/js/*.js
- Automatic Detection: Respects user's system preference
- Manual Toggle: Theme switcher in navigation
- Persistent Choice: Remembers user preference
- Smooth Transitions: Seamless theme switching
- CSS Architecture: Modular CSS with efficient selectors
- Font Loading: Optimized web font loading
- Image Optimization: Responsive images with proper sizing
- Animation Performance: GPU-accelerated animations
- Content Security Policy: Comprehensive CSP headers
- HTTPS Enforcement: Automatic secure redirects
- Input Validation: Strict sanitization of all inputs
- Session Security: Secure session management
- Dynamic title and description generation
- Open Graph tags for social sharing
- Twitter Card support
- Canonical URLs
- JSON-LD Article schema
- Breadcrumb navigation markup
- Search engine optimization
- Twitter sharing with custom text
- Facebook sharing with previews
- Copy-to-clipboard functionality
- Social media meta tags
- Mobile: < 640px
- Tablet: 640px - 1024px
- Desktop: > 1024px
- Touch-friendly interactions
- Optimized navigation
- Readable typography
- Efficient layouts
- Proper heading hierarchy
- Alt text for images
- Keyboard navigation
- Focus management
- Screen reader compatibility
- High contrast mode
- Reduced motion support
- Skip navigation links
The project uses a modern CSS architecture with:
- CSS Custom Properties for theming
- Component-based organization
- Utility-first approach for rapid development
- BEM-inspired naming for clarity
/* Override design tokens in your custom CSS */
:root {
--color-primary: #your-color;
--font-family-primary: 'Your Font', sans-serif;
--space-md: 1.5rem;
}
- Minimal Dependencies: Only essential external resources
- Efficient CSS: Optimized selectors and minimal redundancy
- Font Display: Swap for faster text rendering
- Image Optimization: Proper sizing and modern formats
- Semantic HTML structure
- Progressive enhancement
- Mobile-first CSS
- Accessible by default
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
- Use consistent indentation (2 spaces)
- Follow BEM naming conventions
- Write semantic HTML
- Maintain accessibility standards
This project is open source and available under the MIT License.
- Documentation: Comprehensive README and inline comments
- Issues: GitHub issue tracker for bug reports
- Discussions: GitHub discussions for questions and ideas
- Check PHP error logs
- Verify file permissions
- Ensure HTTPS is configured
- Test with different browsers
QiBlog - A modern, beautiful, and secure flat-file CMS that prioritizes user experience and developer happiness. Built with β€οΈ and attention to detail.