bristol-digital/qwikblog
最新稳定版本:1.0.3
Composer 安装命令:
composer require bristol-digital/qwikblog
包简介
A simple file-based blog system for Laravel with Tailwind CSS
README 文档
README
A simple, file-based blog system for Laravel with Tailwind CSS. No database required.
Features
- 📝 Markdown-based - Write posts in simple markdown files
- 🎨 Tailwind CSS - Beautiful, responsive design out of the box
- ⚡ Fast - File-based with caching
- 🚀 Zero config - Drop in and start writing
- 🎯 Customizable - Publish views and config to customize
Requirements
- PHP 8.1+
- Laravel 10.x or 11.x
- Tailwind CSS
Installation
composer require bristol-digital/qwikblog
Quick Start
After installation, try the example data:
php artisan blog:install-examples
This installs:
- 6 example blog posts
- 6 hero images
Visit http://yourapp.test/blog to see your blog in action!
Remove Example Data
Simply delete the files:
rm resources/posts/*.md rm public/images/blog/*.jpg
- Publish the config:
php artisan vendor:publish --tag=qwikblog-config
- Create posts directory:
mkdir resources/posts
- Configure Tailwind to include package views in
tailwind.config.js:
content: [ './resources/**/*.blade.php', './vendor/bristol-digital/qwikblog/src/resources/**/*.blade.php', ], plugins: [ require('@tailwindcss/typography'), ],
- Install Tailwind Typography:
npm install @tailwindcss/typography
- Create your first post
resources/posts/2024-11-20-hello-world.md:
--- title: Hello World subtitle: My first blog post category: General hero_image: /images/hero.jpg --- This is my first blog post using QwikBlog! ## It supports markdown - Easy to write - Easy to read - Easy to maintain
- Visit your blog:
http://yourapp.test/blog
Usage
Creating Posts
Create markdown files in resources/posts/ with the naming format:
YYYY-MM-DD-slug.md
Example: 2024-11-20-my-awesome-post.md
Post Format
--- title: Post Title subtitle: Post subtitle summary: Post summary category: Category Name hero_image: /path/to/image.jpg --- Your markdown content here...
Configuration
Edit config/qwikblog.php to customize:
return [ 'posts_path' => resource_path('posts'), 'layout' => 'layouts.app', // Your app layout 'route' => [ 'prefix' => 'blog', // Change to 'articles', 'news', etc. 'middleware' => ['web'], 'name_prefix' => 'blog.', ], 'per_page' => 12, 'cache_duration' => 3600, ];
Customizing Views
Publish views to customize the design:
php artisan vendor:publish --tag=qwikblog-views
Views will be published to resources/views/vendor/qwikblog/
Clearing Cache
After adding new posts:
php artisan cache:clear
or
php artisan blog:refresh
Routes
The package automatically registers these routes:
GET /blog- Blog index with paginationGET /blog/{slug}- Individual blog post
License
MIT
统计信息
- 总下载量: 21
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-22