PHPackages                             igorw/balrog - 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. igorw/balrog

ActiveLibrary

igorw/balrog
============

The tiny static site generator.

28424[1 issues](https://github.com/igorw/balrog/issues)PHP

Since Dec 15Pushed 13y ago2 watchersCompare

[ Source](https://github.com/igorw/balrog)[ Packagist](https://packagist.org/packages/igorw/balrog)[ RSS](/packages/igorw-balrog/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Balrog
======

[](#balrog)

The tiny static site generator written in lisphp.

Usage
-----

[](#usage)

To start a new site, just add the dependency via composer:

```
$ composer init --require igorw/balrog:dev-master -n

```

Now you can add the following directories:

- **assets:** All of these files will be copied to the web directory. You can add JavaScript, CSS and images in here.
- **layouts:** The layouts are used to render the pages. They have a `.html.twig` suffix. You can create base templates and have more specific ones that extend them using the `extends` tag.

    Layouts get access to following variables:

    - **post:** Contains the data of the current post (it is not set on the index page). A post has `title`, `body` and any additional front-matter meta data. `body` contains the markdown body rendered as html.
    - **posts:** A listing of all posts in reverse order of publication.

    Filenames that follow the `index.$format.twig` naming scheme will get compiled to an `index.$format` file.
- **posts:** Markdown files representing blog posts. Must be in the format of `YYYY-mm-dd-slug.md`, e.g. `2012-09-20-like-a-hacker.md`. Each one must begin with a YAML front matter. Here is a sample blog post:

    ```
      ---
      layout: post
      title: Blogging Like a Hacker
      ---

      # Blogging Like a Hacker

      * I’m bloggin yo!
      * ORLY?
      * YARLY!

    ```

    The following fields are defined:

    - **title:** Title of the blog post for display on the index.
    - **layout:** Layout to be used for rendering this post. Defaults to `default`, which means `layouts/default.html.twig` is rendered unless specified otherwise.
    - **hidden:** Set this to true to hide a post from the index.

    Other fields can be defined at will and used in the template.

In order to build the site, you can use the `balrog build` command:

```
$ vendor/bin/balrog build

```

This will populate the `static` directory with a set of files that can be deployed onto any static web server.

Quote of the day
----------------

[](#quote-of-the-day)

"Fly, you fools!" - Gandalf

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3afcc18d00fff840775bbf9570b3e9cd3997ca4820b9bfb14caf6da3ae580370?d=identicon)[igorw](/maintainers/igorw)

---

Top Contributors

[![igorw](https://avatars.githubusercontent.com/u/88061?v=4)](https://github.com/igorw "igorw (32 commits)")

### Embed Badge

![Health badge](/badges/igorw-balrog/health.svg)

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

PHPackages © 2026

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