PHPackages                             datashaman/tongs - 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. [CLI &amp; Console](/categories/cli)
4. /
5. datashaman/tongs

AbandonedArchivedProject[CLI &amp; Console](/categories/cli)

datashaman/tongs
================

Metalsmith-alike for Laravel.

1.2.1(6y ago)0122[1 PRs](https://github.com/datashaman/tongs/pulls)6MITPHPPHP ^7.2

Since Jan 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/datashaman/tongs)[ Packagist](https://packagist.org/packages/datashaman/tongs)[ RSS](/packages/datashaman-tongs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (11)Versions (28)Used By (6)

tongs
=====

[](#tongs)

Static site generator using Laravel Zero. Heavily based on [metalsmith](https:/metalsmith.io). WIP.

example site
------------

[](#example-site)

Source code for the example site is at [datashaman/tongs-example](https://github.com/datashaman/tongs-example).

The built files are deployed at [tongs-example.datashaman.com](http://tongs-example.datashaman.com).

source and destination
----------------------

[](#source-and-destination)

The `source` and `destination` configs can be a string or a config array for a Laravel filesystem.

If it's a string, a *local* filesystem is created with the root set to `directory`/`source` values, where `directory` will be the current working directory if you use the command-line app.

For example:

```
{
    "source": "src",
    "destination": {
        "driver": "s3",
        "region": "eu-west-1",
        "bucket": "example.com"
    }
}

```

Will build from `src` directory to the root of an S3 bucket named `example.com` using the default AWS credentials.

plugins
-------

[](#plugins)

The following plugins are provided by this package:

### collections

[](#collections)

Add posts to `collections` metadata by adding a `collection` value in front matter or matching files with a `pattern` (it uses [fnmatch](https://php.net/functions/fnmatch).

For example:

```
{
    "plugins": {
        "collections": {
            "posts": "posts/*.html",
            "other": {
                "pattern": "other/*.html"
            }
        }
    }
}

```

Will create two collections in metadata at `$collections['posts']` and `$collections['other']`. If you also add `collection: featured` to posts' frontmatter, you can access the collection of those posts at `$collections['featured']`.

### drafts

[](#drafts)

Mark posts as being a draft so they are not built.

For example:

```
{
    "plugins": {
        "drafts": truu
    }
}

```

will remove a post with `draft: true` in frontmatter.

### markdown

[](#markdown)

Render Markdown files into HTML.

For example:

```
{
    "plugins": {
        "markdown": {
            "breaksEnabled": true,
            "strictMode": true
        }
    }
}

```

will convert the content from Markdown to HTML (and rename files) using a [Parsedown](https://github.com/erusev/parsedown) parser. The configuration object is mangled to create config calls to the parser.

For example, the above will configure the parser with `setBreaksEnabled(true)` and `setStrictMode(true)`. Consult the [source code](https://github.com/erusev/parsedown/blob/master/Parsedown.php) for the options.

### views

[](#views)

Render views and layouts to HTML using Blade views.

For example:

```
{
    "plugins": {
        "views": {
            "paths": [
                "views"
            ],
            "compiled": ".cache"
        }
    }
}

```

Put `view: post` frontmatter in a post and it will be rendered from `views/post.blade.php` with Blade. Local view variables are made up the post frontmatter and the global metadata values.

More plugin packages:

- `feed` in [datashaman/tongs-feed](http://github.com/datashaman/tongs-feed)
- `metadata` in [datashaman/tongs-metadata](http://github.com/datashaman/tongs-metadata)
- `more` in [datashaman/tongs-more](http://github.com/datashaman/tongs-more)
- `permalinks` in [datashaman/tongs-permalinks](http://github.com/datashaman/tongs-permalinks)
- `sass` in [datashaman/tongs-sass](http://github.com/datashaman/tongs-sass)

To create your own plugins, look at the [plugin template](https://github.com/datashaman/tongs-plugin).

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

26

Last Release

2300d ago

Major Versions

0.3.7 → 1.0.02020-01-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/48372fbab9c5059c6d5773bb3d42dff0382443ceb65d008fc219ad38a383eafd?d=identicon)[datashaman](/maintainers/datashaman)

---

Top Contributors

[![datashaman](https://avatars.githubusercontent.com/u/59514?v=4)](https://github.com/datashaman "datashaman (105 commits)")

---

Tags

laravelmetalsmithssgstatic-sitestatic-site-generatortongsclilaravelstatic-site-generatorstatic-sitessgtongsmetalsmith

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/datashaman-tongs/health.svg)

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

PHPackages © 2026

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