benbjurstrom/prezet
Prezet is a Laravel package for creating presentations from Markdown. Author slides in plain Markdown with front matter, then render them as polished, customizable HTML decks. Great for developer talks, internal docs, and sharing presentations directly from your Laravel app.
composer require benbjurstrom/prezet, then run php artisan prezet:install to publish config/prezet.php, migrations, and scaffold the content/ directory.php artisan migrate to create the SQLite index table, then php artisan prezet:index to parse your markdown into it. The index is what the router queries — the filesystem alone is not enough.Prezet::routes() in routes/web.php (or publish the generated route file and wire it yourself if you need custom middleware).hello-world.md into content/ with front matter (title, date, excerpt, category, image, draft), re-run prezet:index, and hit /blog/hello-world. If you see a 404, the index has not been built or the slug does not match.config/prezet.php — route prefix, content path, database connection, and image handling are all there. That is the file you will edit most.prezet:index → refresh. Wire prezet:index into a watch script (or a small file-system listener) so drafts preview without manual indexing. prezet:update (if present in your version) is the incremental counterpart to a full re-index.php artisan prezet:index as a post-deploy step, or generate it in your deploy script after composer install. Do not assume the local index ships with the code.prezet::prose (and layout) Blade component that wraps parsed HTML with typography styles. Publish the views (prezet:install --views or vendor:publish) and override them when you need custom markup around articles, or a different layout entirely.BenBjurstrom\Prezet\Models\Document directly in controllers to build category, tag, or date-archive pages. The model carries front matter fields (title, category, date, excerpt, draft) so you avoid parsing markdown twice.prezet:image command processes images referenced from front matter or markdown and stores derivatives keyed to content. Keep image paths relative to the content directory so they resolve on both local and prod.prezet:index in the same deploy step — otherwise new posts are missing from the map.content/.config/prezet.php points (typically database/prezet.sqlite). On container hosts that get recreated, that file vanishes — provision it from a build step or point at a persistent disk.2024-01-01, versions, ISBNs — to floats, mangling output. If you were string-quoting front matter values as a workaround, you can drop that on ^1.4.0.prezet:index runs; until then you can serve a 200 on a dead URL.Prezet::routes() registers a catch-all under your configured prefix. If you also have an application route under /blog/..., yours must be registered first or you must narrow the Prezet prefix.draft: true front matter is respected at query time, not at file discovery — draft files are still indexed. Gate previews behind auth in production, or delete drafts before building the prod index.How can I help you explore Laravel packages today?