PHPackages                             builtbyberry/laravel-articles - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. builtbyberry/laravel-articles

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

builtbyberry/laravel-articles
=============================

Git-native markdown articles for Laravel — folder discovery, frontmatter status, Atom feed, and sitemap.

v0.3.0(2w ago)00MITPHPPHP ^8.5CI passing

Since Jun 9Pushed 2w agoCompare

[ Source](https://github.com/builtbyberry/laravel-articles)[ Packagist](https://packagist.org/packages/builtbyberry/laravel-articles)[ RSS](/packages/builtbyberry-laravel-articles/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (10)Versions (4)Used By (0)

builtbyberry/laravel-articles
=============================

[](#builtbyberrylaravel-articles)

[![tests](https://github.com/builtbyberry/laravel-articles/actions/workflows/tests.yml/badge.svg)](https://github.com/builtbyberry/laravel-articles/actions/workflows/tests.yml)[![Latest Version on Packagist](https://camo.githubusercontent.com/60dba8b07e821a643b8a9a58df5d1b3ce13bb3d58f7056379123035186290b3d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6275696c74627962657272792f6c61726176656c2d61727469636c65732e737667)](https://packagist.org/packages/builtbyberry/laravel-articles)[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

Git-native markdown articles for Laravel. Drop markdown files into a folder, set a `status` in frontmatter, and get an article index, individual pages, ordered series, an Atom feed, and a sitemap — no database, no admin UI. Content lives in your repo and ships with your deploys.

Requirements
------------

[](#requirements)

- PHP 8.5+ (the package targets 8.5 so it can use current PHP language features)
- Laravel 12 or 13

Install
-------

[](#install)

```
composer require builtbyberry/laravel-articles
php artisan vendor:publish --tag=articles-config
```

The service provider is auto-discovered. Publishing the config is optional — the package ships with working defaults — but recommended so you can set your content path, SEO defaults, and routes.

Content layout
--------------

[](#content-layout)

```
articles/
  _template.md
  _series/
    my-series.yaml
  my-slug/
    article.md

```

Each article lives at `{content_path}/{slug}/article.md` with YAML frontmatter. Set `status` in frontmatter: `draft`, `ready`, `published`, or `archived`. Status controls where an article surfaces (see [Discovery statuses](#configuration)).

### Cross-article links

[](#cross-article-links)

Link between articles with either a flat `slug.md` or the folder-style `../other-slug/article.md` (which also resolves when the markdown is viewed on GitHub). Both rewrite to `{url_prefix}/other-slug`; anchors (`#section`) are preserved. Non-`.md` links are left untouched.

### Stripped sections

[](#stripped-sections)

Headings listed in `strip_sections` (default `['Channel notes']`) are removed from the **rendered page** — everything from `## ` to the end of the document, plus a preceding `---`. The source `article.md` is never modified, so the section still appears in your editor, in git, and in GitHub's view. Matching is heading-prefix based and whitespace-insensitive (`Channel notes` also strips `## Channel notes (internal)`). Set `strip_sections` to `[]` to disable.

### Markdown and untrusted input

[](#markdown-and-untrusted-input)

Articles are git-native and author-trusted by default, so the renderer allows raw HTML and all link schemes. If you ever render untrusted markdown, set `markdown.html_input` to `escape` (or `strip`) and `markdown.allow_unsafe_links` to `false`.

Series
------

[](#series)

Define ordered article arcs in `{content_path}/_series/{slug}.yaml`:

```
title: My series
description: |
  Optional markdown intro with [links](/articles/first-slug).
articles:
  - first-slug
  - second-slug
index:
  featured: true   # show as a section on the browse index
  order: 10        # section sort (lower first)
```

Order comes from the `articles` list. Only slugs visible for the current surface are included; missing or draft slugs are skipped. One series per article — if a slug appears in multiple manifests, the first by `index.order` wins.

`SeriesService` exposes `discoverForIndex()`, `resolveSeries()`, `contextForArticle()`(prev/next), and `sitemapEntries()`.

Routes
------

[](#routes)

When `articles.routes.enabled` is true (default):

- `GET /articles` — index (`ready` + `published`)
- `GET /articles/series/{series}` — series landing page
- `GET /articles/{slug}` — show (all statuses reachable by URL)
- `GET /feed.xml` — Atom feed (`published` only)
- `GET /sitemap.xml` — sitemap (`published` + featured series landings)

Only the index, feed, and sitemap respect `status`. The show route renders **any**status by slug, so a `draft` or `archived` article is reachable by anyone who knows its URL — it's simply unlisted, not access-controlled. Gate it in your own middleware if drafts must be private.

Custom UI (Inertia, SPA, or your own Blade)
-------------------------------------------

[](#custom-ui-inertia-spa-or-your-own-blade)

Disable the package routes and bind your own controllers to `ArticlesService` and `SeriesService` — both are resolvable from the container (bound as `scoped`, so they reset per request under Octane). If you wire them into your own long-lived singleton, resolve them per request rather than caching the instance.

```
// config/articles.php
'routes' => ['enabled' => false],
```

```
use BuiltByBerry\LaravelArticles\Services\ArticlesService;

Route::get('/writing', function (ArticlesService $articles) {
    return Inertia::render('Articles/Index', [
        'articles' => $articles->discover(),
    ]);
});

Route::get('/writing/{slug}', function (string $slug, ArticlesService $articles) {
    return Inertia::render('Articles/Show', $articles->render($slug));
});
```

`discover()` returns article cards (slug, title, status, meta); `render($slug)` returns `['html' => ..., 'meta' => ..., ...]` with the parsed frontmatter and rendered body.

Configuration
-------------

[](#configuration)

All keys live in `config/articles.php` after publishing. The most useful ones:

KeyDefaultPurpose`content_path``base_path('articles')`Root directory of article folders.`url_prefix``/articles`URL prefix for the index and article pages.`route_names``articles`, `articles.show`, …Named routes the package registers.`routes.enabled``true`Toggle the built-in routes off to bind your own.`routes.middleware``['web']`Middleware applied to package routes.`discovery.index``['ready', 'published']`Statuses shown on the index.`discovery.feed``['published']`Statuses included in the Atom feed.`discovery.sitemap``['published']`Statuses included in the sitemap.`views.index` / `.show` / `.series``articles.*`Blade views rendered for each surface.`series.path``_series`Subfolder holding series YAML manifests.`series.url_prefix``/articles/series`URL prefix for series landing pages.`seo.canonical_host``env('APP_URL')`Host used to build canonical/OG URLs.`seo.site_name``env('APP_NAME')`Site name for meta tags.`seo.author` / `seo.publisher`—Author/publisher metadata for SEO + JSON-LD.`seo.default_og_image``/images/og/site-default.png`Fallback OG image.`feed.*`enabled, `/feed.xml`, title…Atom feed path and metadata.`sitemap.*`enabled, `/sitemap.xml`, priorities…Sitemap path, changefreq, priority.`github_edit_base``null`Optional base URL for "edit on GitHub" links.`strip_sections``['Channel notes']`Headings whose section is dropped from the rendered page (see below).`markdown.html_input``allow`CommonMark HTML handling: `allow`, `escape`, or `strip`.`markdown.allow_unsafe_links``true`When `false`, blocks `javascript:` and similar link schemes.`last_updated.use_git``true`Prefer git commit date for "last updated"; `false` uses file mtime only.`last_updated.cache_ttl``86400`Seconds to cache the resolved last-updated value.`og.*`view, output dirs, kind labelsOG image generation (see below).OG images (optional)
--------------------

[](#og-images-optional)

Generating per-article Open Graph cards requires [`spatie/browsershot`](https://github.com/spatie/browsershot), which is **not** installed by default. Browsershot drives a headless Chromium via **Node + Puppeteer**, so the host running the command needs Node and a Chromium install — this is the most common setup gotcha.

```
composer require --dev spatie/browsershot
# ensure Node + Puppeteer/Chromium are available on the host
php artisan articles:og-generate
```

Cards render from the `laravel-articles::og.article-card` view (override via `og.view`) into `og.output_dir`.

Testing
-------

[](#testing)

```
composer test   # Pest + Orchestra Testbench
composer lint   # Laravel Pint
```

Contributing
------------

[](#contributing)

See [CONTRIBUTING.md](CONTRIBUTING.md). Bug reports and pull requests are welcome.

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md) for release history and [UPGRADING.md](UPGRADING.md)for version-to-version upgrade notes.

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance97

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

3

Last Release

14d ago

PHP version history (2 changes)0.1.0PHP ^8.3

v0.3.0PHP ^8.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1000887?v=4)[Daniel Berry](/maintainers/dberry37388)[@dberry37388](https://github.com/dberry37388)

---

Top Contributors

[![dberry37388](https://avatars.githubusercontent.com/u/1000887?v=4)](https://github.com/dberry37388 "dberry37388 (6 commits)")

---

Tags

laravelmarkdownblogarticlesgit-native

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/builtbyberry-laravel-articles/health.svg)

```
[![Health](https://phpackages.com/badges/builtbyberry-laravel-articles/health.svg)](https://phpackages.com/packages/builtbyberry-laravel-articles)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M129](/packages/laravel-pulse)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.3k453.6k30](/packages/tightenco-jigsaw)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M125](/packages/roots-acorn)[hasinhayder/tyro-dashboard

Tyro Dashboard - Beautiful admin dashboard for managing Tyro roles, privileges, users, and settings

5443.8k](/packages/hasinhayder-tyro-dashboard)[moonshine/moonshine

Laravel administration panel

1.3k253.1k78](/packages/moonshine-moonshine)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
