bambamboole/filament-blog
最新稳定版本:0.1.0
Composer 安装命令:
composer require bambamboole/filament-blog
包简介
A blog package for Filament, built on top of filament-pages with blocks, SEO, tags, and RSS feed support
README 文档
README
A blog package for Filament, built on top of filament-pages. Posts are block-based content with SEO, tags, RSS feeds, and live preview out of the box.
Requirements
- PHP ^8.4
- Filament ^5.0
- bambamboole/filament-pages ^0.4
Installation
composer require bambamboole/filament-blog
Publish and run the migrations:
php artisan vendor:publish --tag="filament-blog-migrations"
php artisan migrate
Optionally publish the config:
php artisan vendor:publish --tag="filament-blog-config"
Setup
Register the plugin in your Filament panel provider:
use Bambamboole\FilamentBlog\FilamentBlogPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ FilamentBlogPlugin::make(), ]); }
Register the frontend routes in routes/web.php:
use Bambamboole\FilamentBlog\Facades\FilamentBlog; FilamentBlog::routes();
Configuration
Set your application's layout so blog views inherit your site's header, footer, and styles:
// config/filament-blog.php 'layout' => 'layouts.app',
Other configuration options:
| Option | Default | Description |
|---|---|---|
model |
Post::class |
Override with a custom Post model |
tag_model |
Tag::class |
Override with a custom Tag model |
layout |
null |
Blade layout the blog views extend |
routing.prefix |
blog |
URL prefix for blog routes |
routing.tag_prefix |
tags |
URL prefix for tag routes |
pagination.per_page |
10 |
Posts per page |
feed.enabled |
true |
Enable RSS/Atom feed |
cache.enabled |
false |
Enable response caching |
Plugin Options
FilamentBlogPlugin::make() ->navigationGroup('Content') ->navigationIcon('heroicon-o-document-text') ->navigationSort(1);
Importing Posts
Posts can be imported from YAML files using the filament-pages import command:
php artisan filament-pages:import --type=post --path=resources/posts
YAML format:
title: My Post Title slug: my-post-title published_at: '2026-01-15 00:00:00' excerpt: A brief summary of the post. blocks: - type: markdown content: | The post content in markdown.
Testing
composer test
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-29