benbjurstrom / prezet
Prezet: Markdown Blogging for Laravel
Fund package maintenance!
benbjurstrom
Installs: 5 659
Dependents: 0
Suggesters: 0
Security: 0
Stars: 249
Watchers: 2
Forks: 13
Open Issues: 0
Requires
- php: ^8.2
- ext-dom: *
- ext-gd: *
- benbjurstrom/laravel-sitemap-lite: ^7.3.1
- illuminate/contracts: ^10.0||^11.0||^12.0
- league/commonmark: ^2.6.1
- spatie/laravel-package-tools: ^1.16
- symfony/yaml: ^6.2|^7.1
- wendelladriel/laravel-validated-dto: ^4.0
Requires (Dev)
- larastan/larastan: 2.9.8
- laravel/pint: ^1.20
- nunomaduro/collision: ^8.6
- orchestra/testbench: ^9.9
- pestphp/pest: ^3.7
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.1
- phpstan/extension-installer: ^1.4.3
- phpstan/phpstan: 1.12.2
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: 1.4.2
- spatie/browsershot: ^4.0
- dev-main
- v1.0.0-rc6
- v1.0.0-rc5
- v1.0.0-rc4
- v1.0.0-rc3
- v1.0.0-rc2
- v1.0.0-rc1
- v0.21.1
- v0.21.0
- v0.20.1
- v0.20.0
- v0.19.0
- v0.18.0
- v0.17.0
- v0.16.0
- v0.15.0
- v0.14.0
- v0.13.0
- v0.12.0
- v0.11.0
- v0.10.0
- v0.9.0
- v0.8.8
- v0.8.7
- v0.8.6
- v0.8.5
- v0.8.4
- v0.8.3
- v0.8.2
- v0.8.1
- v0.8.0
- v0.7.0
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.1
- v0.4.0
- v0.3.1
- v0.3.0
- v0.2.0
- v0.1.0
- dev-116-create-new-sqlite-file-on-index
- dev-100-configurable-auto-index
This package is not auto-updated.
Last update: 2025-04-11 17:37:13 UTC
README
Prezet: Markdown Blogging for Laravel
Go from markdown files to SEO-friendly blogs, articles, and documentation in seconds! The Prezet framework makes it easy to parse, index, and serve your Markdown content efficiently within a Laravel application.
(Looking for a ready-to-use frontend? Check out template packages like prezet/docs-template!)

Table of Contents
✨ Framework Features
- • SQLite Index
- Indexes your markdown files to support search, pagination, sorting, and filtering.
- • Automatic Image Optimization
- Handles image processing, including compression, scaling, and generating responsive `srcset` attributes.
- • Validated Front Matter
- Define expected front matter fields and automatically cast them into validated Data Transfer Objects (DTOs) for type-safe access in your application.
- • Open Graph (OG) images
- Generate OG images from front matter using a customizable template.
- • Dynamic Table of Contents
- Automatically extracts headings from your Markdown content to generate data for a nested Table of Contents.
- • SEO Optimization
- Automatically generate meta tags based on front matter data for better search engine discoverability.
- • Blade Components
- Include Laravel Blade components in your markdown for enriched, interactive content.
🚀 Quick Start
-
Install the Prezet framework:
# Install the framework package composer require prezet/prezet:^1.0 # Run the framework installer php artisan prezet:install
-
Install a Frontend Template:
The Prezet framework provides the backend engine. A template package provides the frontend (routes, controllers, views, CSS).
Example using the Official Docs Template:
# Install the template package composer require prezet/docs-template --dev # Run the template's installer php artisan docs-template:install
-
Index Your Content: After adding or modifying Markdown files in your content directory update the Prezet index:
php artisan prezet:index --fresh
This command scans your content directory and updates the SQLite index with the latest front matter information. Run this whenever you:
- Add new Markdown files.
- Change a file's slug (filename).
- Modify front matter and need it reflected in listings or searches. (Changes to the main body content of Markdown files are reflected automatically when viewing a single page).
-
Start Your Server:
php artisan serve
Visit the routes defined by your installed frontend template (e.g.,
/prezet
if usingprezet/docs-template
).
Documentation
Detailed documentation is available at prezet.com
Credits
License
The MIT License (MIT). Please see License File for more information.