pubvana / blog
Blog module for Pubvana CMS
Package info
Type:flightphp-plugin
pkg:composer/pubvana/blog
Requires
- php: ^8.1
- enlivenapp/flight-school: ^0.3
- enlivenapp/flight-shield: ^0.2
- enlivenapp/migrations: ^0.2
- ezyang/htmlpurifier: ^4.19
- flightphp/active-record: ^0.7
Suggests
- pubvana/admin: Admin UI for blog management
README
Pubvana Blog
I noticed folks downloading some of these packages. I'm super grateful, Thank You! I would like to let folks know until this notice disappears I'm doing a lot of breaking changes without worrying about them. Once versions are up around 0.5.x things should settle down.
Blog module for Pubvana CMS.
Requirements
- PHP 8.1+
- Flight School ^0.2
- Flight Shield ^0.1
- Flight Migrations ^0.1
- Flight ActiveRecord ^0.7
Installation
composer require pubvana/blog
Enable in app/config/config.php:
'plugins' => [ 'pubvana/blog' => [ 'enabled' => true, 'priority' => 60, ], ],
Flight School config
This package uses Flight School's return-array config format. src/Config/Config.php returns the package defaults as an array, Flight School stores that array under pubvana.blog on $app, and the current public route prefix is defined there with 'routePrepend' => 'blog'.
Service
Mapped as $app->blog(). Provides:
- Posts - CRUD, slug management, status (draft/published/scheduled), featured image via media picker, preview tokens, soft delete
- Categories - CRUD with parent/child hierarchy, slug management
- Tags - auto-created on assignment, delete with pivot cleanup
- Revisions - snapshot on every update, prune to configurable max (default 15), restore to any previous revision
- Post Views - recording and counting
Config
| Key | Default | Description |
|---|---|---|
max_revisions |
15 |
Maximum revisions kept per post |
Public Routes
When enabled, the package registers public blog routes through src/Config/Routes.php:
GET /blogGET /blog/category/{slug}GET /blog/tag/{slug}GET /blog/preview/{token}GET /blog/{slug}
License
MIT