PHPackages                             dempe/scabbard - 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. [Templating &amp; Views](/categories/templating)
4. /
5. dempe/scabbard

ActiveLibrary[Templating &amp; Views](/categories/templating)

dempe/scabbard
==============

Artisan commands for generating a static site based on Blade templates

v1.0.31(7mo ago)058MITPHPPHP ^8.1CI failing

Since Jul 14Pushed 7mo agoCompare

[ Source](https://github.com/dempe/scabbard)[ Packagist](https://packagist.org/packages/dempe/scabbard)[ RSS](/packages/dempe-scabbard/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (33)Used By (0)

Scabbard ⚔️
===========

[](#scabbard-️)

Scabbard is a deterministic (i.e., config-based) static site generator (SSG) built on top of Laravel and Blade. It provides a zero-dependency workflow for generating static sites from your Laravel views.

Features:

- **File watching** 👀 – Monitors specified directories for changes
- **Static builds** 🔨 – Outputs your site to a target directory (`output/` by default)
- **Hot rebuilding** 🔥 – Rebuilds automagically when changes are detected
- **Local server** 🧑🏽‍💻 – Serves the site locally on the port of your choice
- **Fingerprinting** ☝🏼 - Fingerprint your static assets
- **Drafts** 📄 - Skip publishing posts marked with `draft: true` in their YAML frontmatter

All built in pure PHP.

To start the dev server, run:

```
php artisan scabbard:serve

```

And you're off to the races! 🏇🏻

If you want to include your drafts (`draft: true` in your YAML frontmatter),

```
php artisan scabbard:serve --drafts

```

Installation
------------

[](#installation)

```
composer require dempe/scabbard --dev
php artisan vendor:publish --tag=scabbard-config

```

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

[](#configuration)

Configs are in `config/scabbard.php`.

### Static Routes

[](#static-routes)

Map of routes to output filenames.

Each route (i.e., each key in the array) must be declared in a Laravel routes file (e.g., `routes/web.php`). This is because Scabbard calls Laravel for each route allowing you to use controllers or other additional processing.

Note: these are *static* routes (dynamic routes are handled separately).

**Example**:

```
'routes' => [
    '/blog/about' => 'blog/about/index.html',
],
```

### Dynamic Routes

[](#dynamic-routes)

Dynamic routes allow generating multiple pages from a single route pattern.

Each dynamic route defined must map to:

1. `output`: the name of the file you want the parsed view to be written to.
2. `values`: Specify both a *model* and an *attribute* in `Class@attribute` notation.

During the build, Scabbard will call `pluck` on the model for the specified attribute (e.g., `App\Models\Post::pluck('slug');`) and generate a new file for each.

**Example**:

```
'dynamic_routes' => [
    '/posts/{slug}' => [
        'output' => '/posts/{slug}/index.html',
        'values' => 'App\\Models\\Post@slug',
    ],
],
```

### Directories to Watch

[](#directories-to-watch)

These directories trigger a new build if they're updated while you're running the server.

**Default**: `public`, `app`, `resources`.

### Output Directory

[](#output-directory)

Where to build the static site.

**Default**: `./output`.

### Directories to Copy

[](#directories-to-copy)

These are directories that are copied wholesale into your configured output directory.

**Default**: `./public`.

### Drafts

[](#drafts)

Specify your content directories in the config file at `content_directories`. Scabbard will parse the YAML frontmatter. If `draft: true` is set, these files will not be added to the build by default. If you want to include them, pass the `--drafts` option.

### Fingerprint Patterns

[](#fingerprint-patterns)

Specify which files should be fingerprinted during the build. Patterns use shell-style wildcards (e.g., `**/*.css`). Fingerprinted filenames will include a hash based on file content and all HTML and CSS files will have their references updated accordingly. Note: only `href` and `src` attributes with quoted values, and `url()` references in CSS are rewritten. Any query strings or fragments are preserved.

**Default**: `[]` (no fingerprinting).

### Server Port

[](#server-port)

The port your server runs on.

**Default**: `8000`.

### 404 Page

[](#404-page)

The 404 page that `scabbard:serve` will use. The path should be relative to your output directory.

**Default**: `/404.html`.

Additional Commands
-------------------

[](#additional-commands)

### Build

[](#build)

This builds the site once and exits (useful for CICD):

```
php artisan scabbard:build

```

Use the `--watch` flag to enable hot rebuilds without running a server:

```
php artisan scabbard:build --watch

```

Static Analysis
---------------

[](#static-analysis)

This project uses [PHPStan](https://phpstan.org/) for static code analysis. Run:

```
composer phpstan

```

to analyze the codebase.

Notes
-----

[](#notes)

- Works with Laravel 10 and above.
- Scabbard does not require JavaScript, npm, or Node.js.
- You can use any Blade features you normally would in Laravel.

Roadmap
-------

[](#roadmap)

- Markdown parsing
- Syntax highlighting
- Deployment
- (Maybe) Add option to render raw views directly without going through app (useful if you have a set of pure Blade templates)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance64

Regular maintenance activity

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

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 ~3 days

Recently: every ~19 days

Total

31

Last Release

215d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/396e7979d207d9c3ccbb29bc1374f2c8a15d35cc51813d933dd4825139a73e9c?d=identicon)[Smuggling5304](/maintainers/Smuggling5304)

---

Top Contributors

[![dempe](https://avatars.githubusercontent.com/u/1382697?v=4)](https://github.com/dempe "dempe (103 commits)")

---

Tags

bladelaravelssg

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/dempe-scabbard/health.svg)

```
[![Health](https://phpackages.com/badges/dempe-scabbard/health.svg)](https://phpackages.com/packages/dempe-scabbard)
```

###  Alternatives

[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[moonshine/moonshine

Laravel administration panel

1.3k217.1k59](/packages/moonshine-moonshine)[rcrowe/twigbridge

Adds the power of Twig to Laravel

9105.9M50](/packages/rcrowe-twigbridge)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

703141.0k7](/packages/tallstackui-tallstackui)[laravel/folio

Page based routing for Laravel.

608453.9k27](/packages/laravel-folio)

PHPackages © 2026

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