Larablog

Larablog is a Markdown blog for Laravel sites that speak more than one language. A post is a folder, each translation is a file inside it, and every translation has its own slug and its own address: the English one at /blog/chat-moderation-games, the Spanish one at /es/blog/moderacion-chat-videojuegos. It finds, caches and paginates the posts; your own views draw them. It runs the blog of ToxicFilter.
Installation
Requires PHP 8.2+ and Laravel 12 or 13.
composer require edulazaro/larablog php artisan vendor:publish --tag=larablog-config
If the site already uses Laralang, the blog takes the same language prefixes as every other page.
Writing a post
Make a folder under content/blog/ and write one file per language. The folder name never reaches a URL; it only groups the translations:
--- title: "Moderación de chat en videojuegos" slug: moderacion-chat-videojuegos description: "Pillar la toxicidad sin matar las bromas." date: 2026-11-14 category: engineering author: edu --- El cuerpo, en Markdown.
A date in the future schedules the post: it stays out of the listing, the feed and the sitemap, and its address answers 404 until that day, with no deploy needed. draft: true keeps it hidden indefinitely. Categories and authors live in _categories.yml and _authors.yml, with their names written per language.
Linking one post from another
Write the link with the other post's folder and Larablog turns it into the right address for whoever is reading:
Antes, lee [cómo se aplican los glosarios](post:glossaries).
On a Spanish page that is the Spanish post, on an English page the English one, and if the post has no translation yet it falls back to the language it exists in. A renamed slug breaks nothing.
The link can also point at a post that is not out yet. Until its date it is printed as plain words, with no dead link, and on the day the post goes live it becomes a link by itself, on every page that mentions it. So a series can be written in one go and scheduled weeks apart, each post already pointing at the next.
Putting it on the site
use EduLazaro\Larablog\Larablog; Larablog::routes('blog');
That one line gives each language its listing, posts, categories, tags and RSS feed. The views are yours: each receives the posts and $alternates, the address of the same page in every other language, which is what the hreflang tags and a language switcher need. A link opened in the wrong language redirects to the right post with a 301.
Before publishing
php artisan larablog:check
php artisan larablog:check --pending
The first fails on what would reach a reader broken: a post with no title, a slug used twice in one language, a link to a folder that does not exist (in scheduled posts too). It warns about translations that are missing. The second also lists every link still waiting for its post, with the day it becomes a link.
With Laracards installed, php artisan cards:generate draws one social card per post and language from an SVG template.
built and maintained by Edu Lazaro · MIT license